; ; sub_18004EFD0 from 0x18004efd0 to 0x18004f233 (611 bytes) ; ; 4 xrefs: ; > @ 0x180166e50 ; > @ 0x180166e90 ; > @ 0x180166ed0 ; > @ 0x1801f885c ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; mov [rsp+arg_10], r8 ; +0x0, 0x18004efd0 mov [rsp+arg_0], rcx ; +0x5, 0x18004efd5 push rbx ; +0xa, 0x18004efda push rbp ; +0xb, 0x18004efdb push rsi ; +0xc, 0x18004efdc push rdi ; +0xd, 0x18004efdd push r12 ; +0xe, 0x18004efde push r13 ; +0x10, 0x18004efe0 push r14 ; +0x12, 0x18004efe2 push r15 ; +0x14, 0x18004efe4 sub rsp, 28h ; +0x16, 0x18004efe6 mov ebp, 1 ; +0x1a, 0x18004efea mov rsi, r8 ; +0x1f, 0x18004efef mov rbx, rdx ; +0x22, 0x18004eff2 mov r14, rcx ; +0x25, 0x18004eff5 mov edx, ebp ; +0x28, 0x18004eff8 lea r8d, [rbp+47h] ; +0x2a, 0x18004effa call sub_180033C30 ; +0x2e, 0x18004effe mov rdx, [rbx] ; +0x33, 0x18004f003 xor r12d, r12d ; +0x36, 0x18004f006 mov rdi, rax ; +0x39, 0x18004f009 mov r8, [rdx+20h] ; +0x3c, 0x18004f00c mov [rsp+68h+arg_18], r8 ; +0x40, 0x18004f010 test rax, rax ; +0x48, 0x18004f018 jz loc_18004F220 ; +0x4b, 0x18004f01b mov [rax], rsi ; +0x51, 0x18004f021 mov edx, [rsi+0Ch] ; +0x54, 0x18004f024 mov [rax+8], edx ; +0x57, 0x18004f027 mov rcx, [r8+1320h] ; +0x5a, 0x18004f02a mov [rax+10h], rcx ; +0x61, 0x18004f031 movsxd rax, dword ptr [rsi+10h] ; +0x65, 0x18004f035 lea rcx, [rax+rax*8] ; +0x69, 0x18004f039 mov rax, [r8+1320h] ; +0x6d, 0x18004f03d lea r8, [rax+rcx*8] ; +0x74, 0x18004f044 mov rcx, r14 ; +0x78, 0x18004f048 mov [rdi+18h], r8 ; +0x7b, 0x18004f04b mov ebx, [r8] ; +0x7f, 0x18004f04f lea r8d, [rbp+7] ; +0x82, 0x18004f052 mov [rsp+68h+arg_8], ebx ; +0x86, 0x18004f056 call sub_180033C30 ; +0x8a, 0x18004f05a mov [rdi+20h], rax ; +0x8f, 0x18004f05f test rax, rax ; +0x93, 0x18004f063 jz loc_18004F220 ; +0x96, 0x18004f066 mov eax, [rdi+8] ; +0x9c, 0x18004f06c xor r13d, r13d ; +0x9f, 0x18004f06f test eax, eax ; +0xa2, 0x18004f072 jle loc_18004F159 ; +0xa4, 0x18004f074 xor r15d, r15d ; +0xaa, 0x18004f07a xor r14d, r14d ; +0xad, 0x18004f07d add rsi, 14h ; +0xb0, 0x18004f080 mov eax, [rsi] ; +0xb4, 0x18004f084 xor ebx, ebx ; +0xb6, 0x18004f086 test eax, eax ; +0xb8, 0x18004f088 jz loc_18004F139 ; +0xba, 0x18004f08a inc ebx ; +0xc0, 0x18004f090 shr eax, 1 ; +0xc2, 0x18004f092 jnz short loc_18004F090 ; +0xc4, 0x18004f094 test ebx, ebx ; +0xc6, 0x18004f096 jz loc_18004F139 ; +0xc8, 0x18004f098 mov rcx, [rsp+68h+arg_0] ; +0xce, 0x18004f09e cmp ebx, r12d ; +0xd3, 0x18004f0a3 mov eax, ebx ; +0xd6, 0x18004f0a6 mov r8d, 8 ; +0xd8, 0x18004f0a8 cmovle eax, r12d ; +0xde, 0x18004f0ae mov edx, ebx ; +0xe2, 0x18004f0b2 mov r12d, eax ; +0xe4, 0x18004f0b4 call sub_180033C30 ; +0xe7, 0x18004f0b7 mov rcx, [rdi+20h] ; +0xec, 0x18004f0bc mov [r14+rcx], rax ; +0xf0, 0x18004f0c0 mov rax, [rdi+20h] ; +0xf4, 0x18004f0c4 cmp qword ptr [r14+rax], 0 ; +0xf8, 0x18004f0c8 jz loc_18004F220 ; +0xfd, 0x18004f0cd test ebx, ebx ; +0x103, 0x18004f0d3 jle short loc_18004F139 ; +0x105, 0x18004f0d5 mov r11, [rsp+68h+arg_10] ; +0x107, 0x18004f0d7 xor r9d, r9d ; +0x10f, 0x18004f0df add r11, 114h ; +0x112, 0x18004f0e2 mov r10d, ebx ; +0x119, 0x18004f0e9 mov eax, ebp ; +0x11c, 0x18004f0ec mov rbp, [rsp+68h+arg_18] ; +0x11e, 0x18004f0ee lea r11, [r11+r15*4] ; +0x126, 0x18004f0f6 nop word ptr [rax+rax+00h] ; +0x12a, 0x18004f0fa test [rsi], eax ; +0x130, 0x18004f100 jz short loc_18004F129 ; +0x132, 0x18004f102 movsxd rcx, dword ptr [r11] ; +0x134, 0x18004f104 inc r15 ; +0x137, 0x18004f107 add r11, 4 ; +0x13a, 0x18004f10a lea rdx, [rcx+rcx*8] ; +0x13e, 0x18004f10e mov rcx, [rbp+1320h] ; +0x142, 0x18004f112 lea r8, [rcx+rdx*8] ; +0x149, 0x18004f119 mov rcx, [rdi+20h] ; +0x14d, 0x18004f11d mov rdx, [r14+rcx] ; +0x151, 0x18004f121 mov [r9+rdx], r8 ; +0x155, 0x18004f125 rol eax, 1 ; +0x159, 0x18004f129 add r9, 8 ; +0x15b, 0x18004f12b sub r10, 1 ; +0x15f, 0x18004f12f jnz short loc_18004F100 ; +0x163, 0x18004f133 lea ebp, [r10+1] ; +0x165, 0x18004f135 mov eax, [rdi+8] ; +0x169, 0x18004f139 inc r13d ; +0x16c, 0x18004f13c add rsi, 4 ; +0x16f, 0x18004f13f add r14, 8 ; +0x173, 0x18004f143 cmp r13d, eax ; +0x177, 0x18004f147 jl loc_18004F084 ; +0x17a, 0x18004f14a mov ebx, [rsp+68h+arg_8] ; +0x180, 0x18004f150 mov r14, [rsp+68h+arg_0] ; +0x184, 0x18004f154 mov [rdi+28h], ebp ; +0x189, 0x18004f159 test ebx, ebx ; +0x18c, 0x18004f15c jle short loc_18004F16E ; +0x18e, 0x18004f15e mov ecx, ebx ; +0x190, 0x18004f160 imul ebp, eax ; +0x192, 0x18004f162 sub rcx, 1 ; +0x195, 0x18004f165 jnz short loc_18004F162 ; +0x199, 0x18004f169 mov [rdi+28h], ebp ; +0x19b, 0x18004f16b lea edx, ds:0[rbp*8] ; +0x19e, 0x18004f16e mov [rdi+0Ch], r12d ; +0x1a5, 0x18004f175 mov rcx, r14 ; +0x1a9, 0x18004f179 call sub_180033CC0 ; +0x1ac, 0x18004f17c mov [rdi+30h], rax ; +0x1b1, 0x18004f181 test rax, rax ; +0x1b5, 0x18004f185 jz loc_18004F220 ; +0x1b8, 0x18004f188 mov eax, [rdi+28h] ; +0x1be, 0x18004f18e xor r14d, r14d ; +0x1c1, 0x18004f191 movsxd r15, ebx ; +0x1c4, 0x18004f194 test eax, eax ; +0x1c7, 0x18004f197 jle loc_18004F21B ; +0x1c9, 0x18004f199 lea r12d, ds:0[rbx*4] ; +0x1cf, 0x18004f19f xor esi, esi ; +0x1d7, 0x18004f1a7 nop dword ptr [rax+00000000h] ; +0x1d9, 0x18004f1a9 mov rcx, [rsp+68h+arg_0] ; +0x1e0, 0x18004f1b0 cdq ; +0x1e5, 0x18004f1b5 idiv dword ptr [rdi+8] ; +0x1e6, 0x18004f1b6 mov edx, r12d ; +0x1e9, 0x18004f1b9 mov ebp, r14d ; +0x1ec, 0x18004f1bc mov ebx, eax ; +0x1ef, 0x18004f1bf call sub_180033CC0 ; +0x1f1, 0x18004f1c1 mov rcx, [rdi+30h] ; +0x1f6, 0x18004f1c6 mov [rsi+rcx], rax ; +0x1fa, 0x18004f1ca mov rcx, [rdi+30h] ; +0x1fe, 0x18004f1ce cmp qword ptr [rsi+rcx], 0 ; +0x202, 0x18004f1d2 jz short loc_18004F220 ; +0x207, 0x18004f1d7 xor r9d, r9d ; +0x209, 0x18004f1d9 test r15, r15 ; +0x20c, 0x18004f1dc jle short loc_18004F20C ; +0x20f, 0x18004f1df mov eax, ebp ; +0x211, 0x18004f1e1 cdq ; +0x213, 0x18004f1e3 idiv ebx ; +0x214, 0x18004f1e4 mov ecx, eax ; +0x216, 0x18004f1e6 mov r8d, eax ; +0x218, 0x18004f1e8 imul ecx, ebx ; +0x21b, 0x18004f1eb mov eax, ebx ; +0x21e, 0x18004f1ee cdq ; +0x220, 0x18004f1f0 idiv dword ptr [rdi+8] ; +0x221, 0x18004f1f1 sub ebp, ecx ; +0x224, 0x18004f1f4 mov rcx, [rdi+30h] ; +0x226, 0x18004f1f6 mov ebx, eax ; +0x22a, 0x18004f1fa mov rdx, [rsi+rcx] ; +0x22c, 0x18004f1fc mov [rdx+r9*4], r8d ; +0x230, 0x18004f200 inc r9 ; +0x234, 0x18004f204 cmp r9, r15 ; +0x237, 0x18004f207 jl short loc_18004F1E1 ; +0x23a, 0x18004f20a mov eax, [rdi+28h] ; +0x23c, 0x18004f20c inc r14d ; +0x23f, 0x18004f20f add rsi, 8 ; +0x242, 0x18004f212 cmp r14d, eax ; +0x246, 0x18004f216 jl short loc_18004F1B0 ; +0x249, 0x18004f219 mov rax, rdi ; +0x24b, 0x18004f21b jmp short loc_18004F222 ; +0x24e, 0x18004f21e xor eax, eax ; +0x250, 0x18004f220 add rsp, 28h ; +0x252, 0x18004f222 pop r15 ; +0x256, 0x18004f226 pop r14 ; +0x258, 0x18004f228 pop r13 ; +0x25a, 0x18004f22a pop r12 ; +0x25c, 0x18004f22c pop rdi ; +0x25e, 0x18004f22e pop rsi ; +0x25f, 0x18004f22f pop rbp ; +0x260, 0x18004f230 pop rbx ; +0x261, 0x18004f231 retn ; +0x262, 0x18004f232