; ; sub_18002FB90 from 0x18002fb90 to 0x18002ffed (1117 bytes) ; ; 2 xrefs: ; > sub_180031D30 @ 0x180031e40 ; > @ 0x1801f7908 ; ; 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:03 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x18002fb90 mov [rsp+arg_8], rbp ; +0x5, 0x18002fb95 mov [rsp+arg_10], rsi ; +0xa, 0x18002fb9a push rdi ; +0xf, 0x18002fb9f push r12 ; +0x10, 0x18002fba0 push r13 ; +0x12, 0x18002fba2 push r14 ; +0x14, 0x18002fba4 push r15 ; +0x16, 0x18002fba6 sub rsp, 20h ; +0x18, 0x18002fba8 mov r14, rdx ; +0x1c, 0x18002fbac movsxd rbx, r8d ; +0x1f, 0x18002fbaf mov edx, 9 ; +0x22, 0x18002fbb2 mov r15d, r9d ; +0x27, 0x18002fbb7 mov rsi, rcx ; +0x2a, 0x18002fbba call sub_18002B930 ; +0x2d, 0x18002fbbd mov [r14], eax ; +0x32, 0x18002fbc2 mov edx, 5 ; +0x35, 0x18002fbc5 mov eax, 3 ; +0x3a, 0x18002fbca cmp ebx, 1 ; +0x3f, 0x18002fbcf mov rcx, rsi ; +0x42, 0x18002fbd2 cmovnz edx, eax ; +0x45, 0x18002fbd5 call sub_18002B9C0 ; +0x48, 0x18002fbd8 mov [r14+4], eax ; +0x4d, 0x18002fbdd mov r13, rbx ; +0x51, 0x18002fbe1 test ebx, ebx ; +0x54, 0x18002fbe4 jle short loc_18002FC23 ; +0x56, 0x18002fbe6 lea rbx, [r14+80h] ; +0x58, 0x18002fbe8 mov rdi, r13 ; +0x5f, 0x18002fbef nop dword ptr [rax+00h] ; +0x62, 0x18002fbf2 nop word ptr [rax+rax+00000000h] ; +0x66, 0x18002fbf6 mov edx, 4 ; +0x70, 0x18002fc00 mov dword ptr [rbx-78h], 0FFFFFFFFh ; +0x75, 0x18002fc05 mov rcx, rsi ; +0x7c, 0x18002fc0c call sub_18002B9C0 ; +0x7f, 0x18002fc0f mov [rbx], eax ; +0x84, 0x18002fc14 lea rbx, [rbx+0F0h] ; +0x86, 0x18002fc16 sub rdi, 1 ; +0x8d, 0x18002fc1d jnz short loc_18002FC00 ; +0x91, 0x18002fc21 xor edi, edi ; +0x93, 0x18002fc23 mov r12d, edi ; +0x95, 0x18002fc25 add r14, 0Ch ; +0x98, 0x18002fc28 nop dword ptr [rax+00h] ; +0x9c, 0x18002fc2c mov rbp, rdi ; +0xa0, 0x18002fc30 test r13, r13 ; +0xa3, 0x18002fc33 jle loc_18002FFB6 ; +0xa6, 0x18002fc36 mov rbx, r14 ; +0xac, 0x18002fc3c nop ; +0xaf, 0x18002fc3f mov edx, 0Ch ; +0xb0, 0x18002fc40 mov rcx, rsi ; +0xb5, 0x18002fc45 call sub_18002B930 ; +0xb8, 0x18002fc48 mov edx, 9 ; +0xbd, 0x18002fc4d mov [rbx], eax ; +0xc2, 0x18002fc52 mov rcx, rsi ; +0xc4, 0x18002fc54 call sub_18002B9C0 ; +0xc7, 0x18002fc57 mov [rbx+4], eax ; +0xcc, 0x18002fc5c cmp eax, 120h ; +0xcf, 0x18002fc5f ja loc_18002FFE6 ; +0xd4, 0x18002fc64 cmp dword ptr [rbx], 1000h ; +0xda, 0x18002fc6a ja loc_18002FFE6 ; +0xe0, 0x18002fc70 mov edx, 8 ; +0xe6, 0x18002fc76 mov rcx, rsi ; +0xeb, 0x18002fc7b call sub_18002B9C0 ; +0xee, 0x18002fc7e mov eax, eax ; +0xf3, 0x18002fc83 lea rcx, unk_1801C10C0 ; +0xf5, 0x18002fc85 shl rax, 2 ; +0xfc, 0x18002fc8c sub rcx, rax ; +0x100, 0x18002fc90 mov [rbx+6Ch], rcx ; +0x103, 0x18002fc93 test r15d, r15d ; +0x107, 0x18002fc97 jz short loc_18002FCA4 ; +0x10a, 0x18002fc9a lea rax, [rcx+8] ; +0x10c, 0x18002fc9c mov [rbx+6Ch], rax ; +0x110, 0x18002fca0 mov edx, 4 ; +0x114, 0x18002fca4 mov rcx, rsi ; +0x119, 0x18002fca9 call sub_18002B9C0 ; +0x11c, 0x18002fcac mov [rbx+8], eax ; +0x121, 0x18002fcb1 mov rdx, [rsi+178h] ; +0x124, 0x18002fcb4 mov rax, [rdx+48B0h] ; +0x12b, 0x18002fcbb mov ecx, [rdx+48A8h] ; +0x132, 0x18002fcc2 movzx r8d, byte ptr [rax] ; +0x138, 0x18002fcc8 lea eax, [rcx+1] ; +0x13c, 0x18002fccc shl r8b, cl ; +0x13f, 0x18002fccf mov [rdx+48A8h], eax ; +0x142, 0x18002fcd2 mov rcx, rsi ; +0x148, 0x18002fcd8 mov rdx, [rsi+178h] ; +0x14b, 0x18002fcdb movsxd rax, dword ptr [rdx+48A8h] ; +0x152, 0x18002fce2 sar rax, 3 ; +0x159, 0x18002fce9 add [rdx+48B0h], rax ; +0x15d, 0x18002fced mov rax, [rsi+178h] ; +0x164, 0x18002fcf4 and dword ptr [rax+48A8h], 7 ; +0x16b, 0x18002fcfb test r8b, r8b ; +0x172, 0x18002fd02 jns loc_18002FE0D ; +0x175, 0x18002fd05 mov edx, 2 ; +0x17b, 0x18002fd0b call sub_18002B9C0 ; +0x180, 0x18002fd10 mov [rbx+0Ch], eax ; +0x185, 0x18002fd15 mov rdx, [rsi+178h] ; +0x188, 0x18002fd18 mov rax, [rdx+48B0h] ; +0x18f, 0x18002fd1f mov ecx, [rdx+48A8h] ; +0x196, 0x18002fd26 movzx r8d, byte ptr [rax] ; +0x19c, 0x18002fd2c lea eax, [rcx+1] ; +0x1a0, 0x18002fd30 shl r8b, cl ; +0x1a3, 0x18002fd33 mov [rdx+48A8h], eax ; +0x1a6, 0x18002fd36 mov edx, 5 ; +0x1ac, 0x18002fd3c mov rcx, [rsi+178h] ; +0x1b1, 0x18002fd41 movsxd rax, dword ptr [rcx+48A8h] ; +0x1b8, 0x18002fd48 sar rax, 3 ; +0x1bf, 0x18002fd4f add [rcx+48B0h], rax ; +0x1c3, 0x18002fd53 mov rcx, rsi ; +0x1ca, 0x18002fd5a mov rax, [rsi+178h] ; +0x1cd, 0x18002fd5d and dword ptr [rax+48A8h], 7 ; +0x1d4, 0x18002fd64 movzx eax, r8b ; +0x1db, 0x18002fd6b shr eax, 7 ; +0x1df, 0x18002fd6f mov [rbx+10h], eax ; +0x1e2, 0x18002fd72 call sub_18002B9C0 ; +0x1e5, 0x18002fd75 mov edx, 5 ; +0x1ea, 0x18002fd7a mov [rbx+14h], eax ; +0x1ef, 0x18002fd7f mov rcx, rsi ; +0x1f2, 0x18002fd82 call sub_18002B9C0 ; +0x1f5, 0x18002fd85 mov edx, 3 ; +0x1fa, 0x18002fd8a mov [rbx+18h], eax ; +0x1ff, 0x18002fd8f mov rcx, rsi ; +0x202, 0x18002fd92 mov [rbx+1Ch], edi ; +0x205, 0x18002fd95 call sub_18002B9C0 ; +0x208, 0x18002fd98 shl eax, 3 ; +0x20d, 0x18002fd9d mov edx, 3 ; +0x210, 0x18002fda0 lea rcx, ds:0[rax*4] ; +0x215, 0x18002fda5 add rcx, [rbx+6Ch] ; +0x21d, 0x18002fdad mov [rbx+54h], rcx ; +0x221, 0x18002fdb1 mov rcx, rsi ; +0x225, 0x18002fdb5 call sub_18002B9C0 ; +0x228, 0x18002fdb8 shl eax, 3 ; +0x22d, 0x18002fdbd mov edx, 3 ; +0x230, 0x18002fdc0 lea rcx, ds:0[rax*4] ; +0x235, 0x18002fdc5 add rcx, [rbx+6Ch] ; +0x23d, 0x18002fdcd mov [rbx+5Ch], rcx ; +0x241, 0x18002fdd1 mov rcx, rsi ; +0x245, 0x18002fdd5 call sub_18002B9C0 ; +0x248, 0x18002fdd8 shl eax, 3 ; +0x24d, 0x18002fddd lea rcx, ds:0[rax*4] ; +0x250, 0x18002fde0 add rcx, [rbx+6Ch] ; +0x258, 0x18002fde8 mov [rbx+64h], rcx ; +0x25c, 0x18002fdec cmp dword ptr [rbx+0Ch], 0 ; +0x260, 0x18002fdf0 jz loc_18002FFE6 ; +0x264, 0x18002fdf4 mov dword ptr [rbx+40h], 12h ; +0x26a, 0x18002fdfa mov dword ptr [rbx+44h], 120h ; +0x271, 0x18002fe01 jmp loc_18002FEA4 ; +0x278, 0x18002fe08 mov edx, 5 ; +0x27d, 0x18002fe0d call sub_18002B9C0 ; +0x282, 0x18002fe12 mov edx, 5 ; +0x287, 0x18002fe17 mov [rbx+14h], eax ; +0x28c, 0x18002fe1c mov rcx, rsi ; +0x28f, 0x18002fe1f call sub_18002B9C0 ; +0x292, 0x18002fe22 mov edx, 5 ; +0x297, 0x18002fe27 mov [rbx+18h], eax ; +0x29c, 0x18002fe2c mov rcx, rsi ; +0x29f, 0x18002fe2f call sub_18002B9C0 ; +0x2a2, 0x18002fe32 mov edx, 4 ; +0x2a7, 0x18002fe37 mov [rbx+1Ch], eax ; +0x2ac, 0x18002fe3c mov rcx, rsi ; +0x2af, 0x18002fe3f call sub_18002B9C0 ; +0x2b2, 0x18002fe42 mov edx, 3 ; +0x2b7, 0x18002fe47 mov rcx, rsi ; +0x2bc, 0x18002fe4c mov edi, eax ; +0x2bf, 0x18002fe4f call sub_18002B9C0 ; +0x2c1, 0x18002fe51 movsxd rcx, [rsp+48h+arg_20] ; +0x2c6, 0x18002fe56 lea r9, unk_1801A9860 ; +0x2cb, 0x18002fe5b lea r8, [rcx+rcx*8] ; +0x2d2, 0x18002fe62 lea ecx, [rdi+1] ; +0x2d6, 0x18002fe66 shl r8, 3 ; +0x2d9, 0x18002fe69 movsxd rdx, ecx ; +0x2dd, 0x18002fe6d add rdx, r8 ; +0x2e0, 0x18002fe70 mov ecx, [r9+rdx*4] ; +0x2e3, 0x18002fe73 sar ecx, 1 ; +0x2e7, 0x18002fe77 mov [rbx+40h], ecx ; +0x2e9, 0x18002fe79 lea ecx, [rax+rdi] ; +0x2ec, 0x18002fe7c lea eax, [rcx+2] ; +0x2ef, 0x18002fe7f cmp eax, 16h ; +0x2f2, 0x18002fe82 jle short loc_18002FE8E ; +0x2f5, 0x18002fe85 mov eax, 120h ; +0x2f7, 0x18002fe87 jmp short loc_18002FE9B ; +0x2fc, 0x18002fe8c movsxd rax, ecx ; +0x2fe, 0x18002fe8e add rax, r8 ; +0x301, 0x18002fe91 mov eax, [r9+rax*4+8] ; +0x304, 0x18002fe94 sar eax, 1 ; +0x309, 0x18002fe99 xor edi, edi ; +0x30b, 0x18002fe9b mov [rbx+44h], eax ; +0x30d, 0x18002fe9d mov [rbx+0Ch], rdi ; +0x310, 0x18002fea0 mov rdx, [rsi+178h] ; +0x314, 0x18002fea4 inc rbp ; +0x31b, 0x18002feab mov rax, [rdx+48B0h] ; +0x31e, 0x18002feae mov ecx, [rdx+48A8h] ; +0x325, 0x18002feb5 movzx r8d, byte ptr [rax] ; +0x32b, 0x18002febb shl r8b, cl ; +0x32f, 0x18002febf lea eax, [rcx+1] ; +0x332, 0x18002fec2 mov [rdx+48A8h], eax ; +0x335, 0x18002fec5 mov rcx, [rsi+178h] ; +0x33b, 0x18002fecb movsxd rax, dword ptr [rcx+48A8h] ; +0x342, 0x18002fed2 sar rax, 3 ; +0x349, 0x18002fed9 add [rcx+48B0h], rax ; +0x34d, 0x18002fedd mov rax, [rsi+178h] ; +0x354, 0x18002fee4 and dword ptr [rax+48A8h], 7 ; +0x35b, 0x18002feeb movzx eax, r8b ; +0x362, 0x18002fef2 shr eax, 7 ; +0x366, 0x18002fef6 mov [rbx+48h], eax ; +0x369, 0x18002fef9 mov rdx, [rsi+178h] ; +0x36c, 0x18002fefc mov rax, [rdx+48B0h] ; +0x373, 0x18002ff03 mov ecx, [rdx+48A8h] ; +0x37a, 0x18002ff0a movzx r8d, byte ptr [rax] ; +0x380, 0x18002ff10 shl r8b, cl ; +0x384, 0x18002ff14 lea eax, [rcx+1] ; +0x387, 0x18002ff17 mov [rdx+48A8h], eax ; +0x38a, 0x18002ff1a mov rcx, [rsi+178h] ; +0x390, 0x18002ff20 movsxd rax, dword ptr [rcx+48A8h] ; +0x397, 0x18002ff27 sar rax, 3 ; +0x39e, 0x18002ff2e add [rcx+48B0h], rax ; +0x3a2, 0x18002ff32 mov rax, [rsi+178h] ; +0x3a9, 0x18002ff39 and dword ptr [rax+48A8h], 7 ; +0x3b0, 0x18002ff40 movzx eax, r8b ; +0x3b7, 0x18002ff47 shr eax, 7 ; +0x3bb, 0x18002ff4b mov [rbx+4Ch], eax ; +0x3be, 0x18002ff4e mov rdx, [rsi+178h] ; +0x3c1, 0x18002ff51 mov rax, [rdx+48B0h] ; +0x3c8, 0x18002ff58 mov ecx, [rdx+48A8h] ; +0x3cf, 0x18002ff5f movzx r8d, byte ptr [rax] ; +0x3d5, 0x18002ff65 lea eax, [rcx+1] ; +0x3d9, 0x18002ff69 shl r8b, cl ; +0x3dc, 0x18002ff6c mov [rdx+48A8h], eax ; +0x3df, 0x18002ff6f mov rcx, [rsi+178h] ; +0x3e5, 0x18002ff75 movsxd rax, dword ptr [rcx+48A8h] ; +0x3ec, 0x18002ff7c sar rax, 3 ; +0x3f3, 0x18002ff83 add [rcx+48B0h], rax ; +0x3f7, 0x18002ff87 mov rax, [rsi+178h] ; +0x3fe, 0x18002ff8e and dword ptr [rax+48A8h], 7 ; +0x405, 0x18002ff95 movzx eax, r8b ; +0x40c, 0x18002ff9c shr eax, 7 ; +0x410, 0x18002ffa0 mov [rbx+50h], eax ; +0x413, 0x18002ffa3 add rbx, 0F0h ; +0x416, 0x18002ffa6 cmp rbp, r13 ; +0x41d, 0x18002ffad jl loc_18002FC40 ; +0x420, 0x18002ffb0 inc r12 ; +0x426, 0x18002ffb6 add r14, 78h ; 'x' ; +0x429, 0x18002ffb9 cmp r12, 2 ; +0x42d, 0x18002ffbd jl loc_18002FC30 ; +0x431, 0x18002ffc1 xor eax, eax ; +0x437, 0x18002ffc7 mov rbx, [rsp+48h+arg_0] ; +0x439, 0x18002ffc9 mov rbp, [rsp+48h+arg_8] ; +0x43e, 0x18002ffce mov rsi, [rsp+48h+arg_10] ; +0x443, 0x18002ffd3 add rsp, 20h ; +0x448, 0x18002ffd8 pop r15 ; +0x44c, 0x18002ffdc pop r14 ; +0x44e, 0x18002ffde pop r13 ; +0x450, 0x18002ffe0 pop r12 ; +0x452, 0x18002ffe2 pop rdi ; +0x454, 0x18002ffe4 retn ; +0x455, 0x18002ffe5 mov eax, 0Dh ; +0x456, 0x18002ffe6 jmp short loc_18002FFC9 ; +0x45b, 0x18002ffeb