; ; sub_18002B320 from 0x18002b320 to 0x18002b80b (1259 bytes) ; ; 6 xrefs: ; > sub_180029320 @ 0x180029679 ; > sub_180029320 @ 0x180029740 ; > sub_180029320 @ 0x1800299d0 ; > sub_180029BC0 @ 0x180029cc2 ; > sub_18002B1A0 @ 0x18002b1e2 ; > @ 0x1801f77c4 ; ; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 10:53:01 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x18002b320 push rdi ; +0x5, 0x18002b325 sub rsp, 20h ; +0x6, 0x18002b326 movzx eax, byte ptr [rdx+1] ; +0xa, 0x18002b32a mov r11, r9 ; +0xe, 0x18002b32e movzx r10d, byte ptr [rdx] ; +0x11, 0x18002b331 mov rbx, rcx ; +0x15, 0x18002b335 shl r10d, 8 ; +0x18, 0x18002b338 or r10d, eax ; +0x1c, 0x18002b33c movzx eax, byte ptr [rdx+2] ; +0x1f, 0x18002b33f shl r10d, 8 ; +0x23, 0x18002b343 or r10d, eax ; +0x27, 0x18002b347 movzx eax, byte ptr [rdx+3] ; +0x2a, 0x18002b34a shl r10d, 8 ; +0x2e, 0x18002b34e or r10d, eax ; +0x32, 0x18002b352 mov rax, [rcx+178h] ; +0x35, 0x18002b355 mov [rax+4898h], r10d ; +0x3c, 0x18002b35c mov eax, r10d ; +0x43, 0x18002b363 and eax, 0FFE00000h ; +0x46, 0x18002b366 cmp eax, 0FFE00000h ; +0x4b, 0x18002b36b jnz loc_18002B5B9 ; +0x50, 0x18002b370 xor r9d, r9d ; +0x56, 0x18002b376 bt r10d, 14h ; +0x59, 0x18002b379 jnb short loc_18002B3A8 ; +0x5e, 0x18002b37e mov rax, [rbx+178h] ; +0x60, 0x18002b380 mov ecx, r10d ; +0x67, 0x18002b387 shr ecx, 13h ; +0x6a, 0x18002b38a not ecx ; +0x6d, 0x18002b38d and ecx, 1 ; +0x6f, 0x18002b38f mov [rax+485Ch], ecx ; +0x72, 0x18002b392 mov rax, [rbx+178h] ; +0x78, 0x18002b398 mov [rax+4860h], r9d ; +0x7f, 0x18002b39f jmp short loc_18002B3D5 ; +0x86, 0x18002b3a6 bt r10d, 13h ; +0x88, 0x18002b3a8 jb loc_18002B5B9 ; +0x8d, 0x18002b3ad mov rax, [rcx+178h] ; +0x93, 0x18002b3b3 mov dword ptr [rax+485Ch], 1 ; +0x9a, 0x18002b3ba mov rax, [rcx+178h] ; +0xa4, 0x18002b3c4 mov dword ptr [rax+4860h], 1 ; +0xab, 0x18002b3cb mov eax, r10d ; +0xb5, 0x18002b3d5 mov ecx, 4 ; +0xb8, 0x18002b3d8 shr eax, 11h ; +0xbd, 0x18002b3dd and eax, 3 ; +0xc0, 0x18002b3e0 sub ecx, eax ; +0xc3, 0x18002b3e3 mov rax, [rbx+178h] ; +0xc5, 0x18002b3e5 mov [rax+4868h], ecx ; +0xcc, 0x18002b3ec mov rcx, [rbx+178h] ; +0xd2, 0x18002b3f2 mov edx, [rcx+4868h] ; +0xd9, 0x18002b3f9 lea eax, [rdx-2] ; +0xdf, 0x18002b3ff cmp eax, 1 ; +0xe2, 0x18002b402 ja loc_18002B5B9 ; +0xe5, 0x18002b405 cmp [rcx+48C0h], r9d ; +0xeb, 0x18002b40b jnz short loc_18002B421 ; +0xf2, 0x18002b412 mov [rcx+48C0h], edx ; +0xf4, 0x18002b414 mov rcx, [rbx+178h] ; +0xfa, 0x18002b41a mov eax, [rcx+48C0h] ; +0x101, 0x18002b421 cmp [rcx+4868h], eax ; +0x107, 0x18002b427 jnz loc_18002B5B9 ; +0x10d, 0x18002b42d mov eax, r10d ; +0x113, 0x18002b433 shr eax, 0Ah ; +0x116, 0x18002b436 and eax, 3 ; +0x119, 0x18002b439 cmp eax, 3 ; +0x11c, 0x18002b43c jz loc_18002B5B9 ; +0x11f, 0x18002b43f cmp [rcx+4860h], r9d ; +0x125, 0x18002b445 jz short loc_18002B453 ; +0x12c, 0x18002b44c lea edx, [rax+6] ; +0x12e, 0x18002b44e jmp short loc_18002B45E ; +0x131, 0x18002b451 mov edx, [rcx+485Ch] ; +0x133, 0x18002b453 lea eax, [rax+rdx*2] ; +0x139, 0x18002b459 add edx, eax ; +0x13c, 0x18002b45c mov [rcx+4874h], edx ; +0x13e, 0x18002b45e lea rdi, cs:180000000h ; +0x144, 0x18002b464 test r8, r8 ; +0x14b, 0x18002b46b jz short loc_18002B488 ; +0x14e, 0x18002b46e mov rax, [rbx+178h] ; +0x150, 0x18002b470 movsxd rcx, dword ptr [rax+4874h] ; +0x157, 0x18002b477 mov eax, rva dword_1801A88F0[rdi+rcx*4] ; +0x15e, 0x18002b47e mov [r8], eax ; +0x165, 0x18002b485 mov rax, [rbx+178h] ; +0x168, 0x18002b488 mov ecx, r10d ; +0x16f, 0x18002b48f shr ecx, 10h ; +0x172, 0x18002b492 not ecx ; +0x175, 0x18002b495 and ecx, 1 ; +0x177, 0x18002b497 mov [rax+486Ch], ecx ; +0x17a, 0x18002b49a mov ecx, r10d ; +0x180, 0x18002b4a0 mov rax, [rbx+178h] ; +0x183, 0x18002b4a3 shr ecx, 0Ch ; +0x18a, 0x18002b4aa and ecx, 0Fh ; +0x18d, 0x18002b4ad mov [rax+4870h], ecx ; +0x190, 0x18002b4b0 mov ecx, r10d ; +0x196, 0x18002b4b6 mov rax, [rbx+178h] ; +0x199, 0x18002b4b9 shr ecx, 9 ; +0x1a0, 0x18002b4c0 and ecx, 1 ; +0x1a3, 0x18002b4c3 mov [rax+4878h], ecx ; +0x1a6, 0x18002b4c6 mov ecx, r10d ; +0x1ac, 0x18002b4cc mov rax, [rbx+178h] ; +0x1af, 0x18002b4cf shr ecx, 8 ; +0x1b6, 0x18002b4d6 and ecx, 1 ; +0x1b9, 0x18002b4d9 mov [rax+487Ch], ecx ; +0x1bc, 0x18002b4dc mov ecx, r10d ; +0x1c2, 0x18002b4e2 mov rax, [rbx+178h] ; +0x1c5, 0x18002b4e5 shr ecx, 6 ; +0x1cc, 0x18002b4ec and ecx, 3 ; +0x1cf, 0x18002b4ef mov [rax+4880h], ecx ; +0x1d2, 0x18002b4f2 mov ecx, r10d ; +0x1d8, 0x18002b4f8 mov rax, [rbx+178h] ; +0x1db, 0x18002b4fb shr ecx, 4 ; +0x1e2, 0x18002b502 and ecx, 3 ; +0x1e5, 0x18002b505 mov [rax+4884h], ecx ; +0x1e8, 0x18002b508 mov ecx, r10d ; +0x1ee, 0x18002b50e mov rax, [rbx+178h] ; +0x1f1, 0x18002b511 shr ecx, 3 ; +0x1f8, 0x18002b518 and ecx, 1 ; +0x1fb, 0x18002b51b mov [rax+4888h], ecx ; +0x1fe, 0x18002b51e mov ecx, r10d ; +0x204, 0x18002b524 mov rax, [rbx+178h] ; +0x207, 0x18002b527 and r10d, 3 ; +0x20e, 0x18002b52e shr ecx, 2 ; +0x212, 0x18002b532 and ecx, 1 ; +0x215, 0x18002b535 mov [rax+488Ch], ecx ; +0x218, 0x18002b538 mov rax, [rbx+178h] ; +0x21e, 0x18002b53e mov [rax+4890h], r10d ; +0x225, 0x18002b545 mov rax, [rbx+178h] ; +0x22c, 0x18002b54c cmp dword ptr [rax+4880h], 3 ; +0x233, 0x18002b553 setnz r9b ; +0x23a, 0x18002b55a inc r9d ; +0x23e, 0x18002b55e mov [rax+4850h], r9d ; +0x241, 0x18002b561 mov rdx, [rbx+178h] ; +0x248, 0x18002b568 movsxd r8, dword ptr [rdx+4870h] ; +0x24f, 0x18002b56f test r8d, r8d ; +0x256, 0x18002b576 jz short loc_18002B5B9 ; +0x259, 0x18002b579 cmp r8d, 0Fh ; +0x25b, 0x18002b57b jz short loc_18002B5B9 ; +0x25f, 0x18002b57f cmp dword ptr [rdx+4868h], 2 ; +0x261, 0x18002b581 jnz short loc_18002B5F3 ; +0x268, 0x18002b588 test byte ptr [rbx+2Ch], 2 ; +0x26a, 0x18002b58a jnz short loc_18002B5E1 ; +0x26e, 0x18002b58e movsxd rax, dword ptr [rdx+485Ch] ; +0x270, 0x18002b590 lea rcx, [rax+rax*2] ; +0x277, 0x18002b597 shl rcx, 4 ; +0x27b, 0x18002b59b add rcx, r8 ; +0x27f, 0x18002b59f cmp dword ptr [rdx+4880h], 3 ; +0x282, 0x18002b5a2 mov eax, rva dword_1801A87B0[rdi+rcx*4] ; +0x289, 0x18002b5a9 jnz short loc_18002B5C9 ; +0x290, 0x18002b5b0 cmp eax, 0E0h ; +0x292, 0x18002b5b2 jl short loc_18002B5EA ; +0x297, 0x18002b5b7 mov eax, 13h ; +0x299, 0x18002b5b9 mov rbx, [rsp+28h+arg_0] ; +0x29e, 0x18002b5be add rsp, 20h ; +0x2a3, 0x18002b5c3 pop rdi ; +0x2a7, 0x18002b5c7 retn ; +0x2a8, 0x18002b5c8 add eax, 0FFFFFFE0h ; +0x2a9, 0x18002b5c9 cmp eax, 30h ; '0' ; +0x2ac, 0x18002b5cc ja short loc_18002B5E1 ; +0x2af, 0x18002b5cf mov rcx, 1000001010001h ; +0x2b1, 0x18002b5d1 bt rcx, rax ; +0x2bb, 0x18002b5db jb short loc_18002B5B9 ; +0x2bf, 0x18002b5df cmp dword ptr [rdx+4880h], 1 ; +0x2c1, 0x18002b5e1 jz short loc_18002B5F3 ; +0x2c8, 0x18002b5e8 cmp dword ptr [rdx+4884h], 0 ; +0x2ca, 0x18002b5ea jnz short loc_18002B5B9 ; +0x2d1, 0x18002b5f1 test byte ptr [rbx+2Ch], 2 ; +0x2d3, 0x18002b5f3 jnz short loc_18002B611 ; +0x2d7, 0x18002b5f7 mov rax, [rbx+8] ; +0x2d9, 0x18002b5f9 test rax, rax ; +0x2dd, 0x18002b5fd jz short loc_18002B611 ; +0x2e0, 0x18002b600 mov ecx, [rax+0Ch] ; +0x2e2, 0x18002b602 test ecx, ecx ; +0x2e5, 0x18002b605 jz short loc_18002B611 ; +0x2e7, 0x18002b607 cmp ecx, [rdx+4850h] ; +0x2e9, 0x18002b609 jnz short loc_18002B5B9 ; +0x2ef, 0x18002b60f test r11, r11 ; +0x2f1, 0x18002b611 jz short loc_18002B628 ; +0x2f4, 0x18002b614 mov eax, [rdx+4850h] ; +0x2f6, 0x18002b616 mov [r11], eax ; +0x2fc, 0x18002b61c mov rdx, [rbx+178h] ; +0x2ff, 0x18002b61f jmp short loc_18002B644 ; +0x306, 0x18002b626 mov rax, [rbx+8] ; +0x308, 0x18002b628 mov ecx, [rax+0Ch] ; +0x30c, 0x18002b62c cmp [rdx+4850h], ecx ; +0x30f, 0x18002b62f jz short loc_18002B644 ; +0x315, 0x18002b635 cmp dword ptr [rbx+1C8h], 0 ; +0x317, 0x18002b637 jz loc_18002B5B9 ; +0x31e, 0x18002b63e mov ecx, [rdx+4868h] ; +0x324, 0x18002b644 sub ecx, 2 ; +0x32a, 0x18002b64a jz short loc_18002B6C5 ; +0x32d, 0x18002b64d cmp ecx, 1 ; +0x32f, 0x18002b64f jz short loc_18002B664 ; +0x332, 0x18002b652 mov eax, 44h ; 'D' ; +0x334, 0x18002b654 mov rbx, [rsp+28h+arg_0] ; +0x339, 0x18002b659 add rsp, 20h ; +0x33e, 0x18002b65e pop rdi ; +0x342, 0x18002b662 retn ; +0x343, 0x18002b663 movsxd rax, dword ptr [rdx+485Ch] ; +0x344, 0x18002b664 lea rcx, [rax+rax*2] ; +0x34b, 0x18002b66b movsxd rax, dword ptr [rdx+4870h] ; +0x34f, 0x18002b66f shl rcx, 4 ; +0x356, 0x18002b676 add rcx, rax ; +0x35a, 0x18002b67a imul eax, rva dword_1801A87F0[rdi+rcx*4], 23280h ; +0x35d, 0x18002b67d mov [rdx+4894h], eax ; +0x368, 0x18002b688 mov r9, [rbx+178h] ; +0x36e, 0x18002b68e movsxd rax, dword ptr [r9+4874h] ; +0x375, 0x18002b695 mov ecx, [r9+485Ch] ; +0x37c, 0x18002b69c mov r8d, rva dword_1801A88F0[rdi+rax*4] ; +0x383, 0x18002b6a3 mov eax, [r9+4894h] ; +0x38b, 0x18002b6ab cdq ; +0x392, 0x18002b6b2 shl r8d, cl ; +0x393, 0x18002b6b3 idiv r8d ; +0x396, 0x18002b6b6 mov [r9+4894h], eax ; +0x399, 0x18002b6b9 jmp loc_18002B74D ; +0x3a0, 0x18002b6c0 mov rcx, rbx ; +0x3a5, 0x18002b6c5 call sub_18002D130 ; +0x3a8, 0x18002b6c8 mov rcx, [rbx+178h] ; +0x3ad, 0x18002b6cd cmp dword ptr [rcx+4880h], 1 ; +0x3b4, 0x18002b6d4 jnz short loc_18002B6EC ; +0x3bb, 0x18002b6db mov eax, [rcx+4884h] ; +0x3bd, 0x18002b6dd lea eax, ds:4[rax*4] ; +0x3c3, 0x18002b6e3 jmp short loc_18002B6F2 ; +0x3ca, 0x18002b6ea mov eax, [rcx+4858h] ; +0x3cc, 0x18002b6ec mov [rcx+4854h], eax ; +0x3d2, 0x18002b6f2 mov rdx, [rbx+178h] ; +0x3d8, 0x18002b6f8 movsxd rax, dword ptr [rdx+485Ch] ; +0x3df, 0x18002b6ff lea rcx, [rax+rax*2] ; +0x3e6, 0x18002b706 movsxd rax, dword ptr [rdx+4870h] ; +0x3ea, 0x18002b70a shl rcx, 4 ; +0x3f1, 0x18002b711 add rcx, rax ; +0x3f5, 0x18002b715 imul eax, rva dword_1801A87B0[rdi+rcx*4], 23280h ; +0x3f8, 0x18002b718 mov [rdx+4894h], eax ; +0x403, 0x18002b723 mov r8, [rbx+178h] ; +0x409, 0x18002b729 movsxd rcx, dword ptr [r8+4874h] ; +0x410, 0x18002b730 mov eax, [r8+4894h] ; +0x417, 0x18002b737 cdq ; +0x41e, 0x18002b73e idiv rva dword_1801A88F0[rdi+rcx*4] ; +0x41f, 0x18002b73f mov [r8+4894h], eax ; +0x426, 0x18002b746 mov rcx, [rbx+178h] ; +0x42d, 0x18002b74d mov eax, [rcx+4878h] ; +0x434, 0x18002b754 sub eax, 4 ; +0x43a, 0x18002b75a add [rcx+4894h], eax ; +0x43d, 0x18002b75d mov rcx, [rbx+178h] ; +0x443, 0x18002b763 mov edx, [rcx+4894h] ; +0x44a, 0x18002b76a lea eax, [rdx-10h] ; +0x450, 0x18002b770 cmp eax, 6F0h ; +0x453, 0x18002b773 ja loc_18002B5B9 ; +0x458, 0x18002b778 mov r8, [rsp+28h+arg_20] ; +0x45e, 0x18002b77e mov [rcx+48C4h], edx ; +0x463, 0x18002b783 test r8, r8 ; +0x469, 0x18002b789 jz short loc_18002B7FE ; +0x46c, 0x18002b78c mov rax, [rbx+178h] ; +0x46e, 0x18002b78e mov edx, [rax+4894h] ; +0x475, 0x18002b795 mov [r8], edx ; +0x47b, 0x18002b79b test byte ptr [rbx+2Ch], 2 ; +0x47e, 0x18002b79e jz short loc_18002B7FE ; +0x482, 0x18002b7a2 mov rax, [rbx+8] ; +0x484, 0x18002b7a4 test rax, rax ; +0x488, 0x18002b7a8 jz short loc_18002B7E2 ; +0x48b, 0x18002b7ab cmp dword ptr [rax+0Ch], 2 ; +0x48d, 0x18002b7ad jle short loc_18002B7E2 ; +0x491, 0x18002b7b1 mov rax, [rbx+178h] ; +0x493, 0x18002b7b3 mov ecx, [rax+48C8h] ; +0x49a, 0x18002b7ba cmp [rax+4894h], ecx ; +0x4a0, 0x18002b7c0 cmovl edx, ecx ; +0x4a6, 0x18002b7c6 lea eax, [rdx+13h] ; +0x4a9, 0x18002b7c9 and eax, 0FFFFFFF0h ; +0x4ac, 0x18002b7cc sub eax, 4 ; +0x4af, 0x18002b7cf mov [r8], eax ; +0x4b2, 0x18002b7d2 xor eax, eax ; +0x4b5, 0x18002b7d5 mov rbx, [rsp+28h+arg_0] ; +0x4b7, 0x18002b7d7 add rsp, 20h ; +0x4bc, 0x18002b7dc pop rdi ; +0x4c0, 0x18002b7e0 retn ; +0x4c1, 0x18002b7e1 mov rax, [rbx+178h] ; +0x4c2, 0x18002b7e2 cmp dword ptr [rax+4868h], 3 ; +0x4c9, 0x18002b7e9 jnz short loc_18002B7FE ; +0x4d0, 0x18002b7f0 lea eax, [rdx+7] ; +0x4d2, 0x18002b7f2 and eax, 0FFFFFFFCh ; +0x4d5, 0x18002b7f5 sub eax, 4 ; +0x4d8, 0x18002b7f8 mov [r8], eax ; +0x4db, 0x18002b7fb mov rbx, [rsp+28h+arg_0] ; +0x4de, 0x18002b7fe xor eax, eax ; +0x4e3, 0x18002b803 add rsp, 20h ; +0x4e5, 0x18002b805 pop rdi ; +0x4e9, 0x18002b809 retn ; +0x4ea, 0x18002b80a