; ; sub_18004EDE0 from 0x18004ede0 to 0x18004efcd (493 bytes) ; ; 5 xrefs: ; > @ 0x180166e48 ; > @ 0x180166e88 ; > @ 0x180166ec8 ; > @ 0x1801f8844 ; > @ 0x1801f8850 ; ; 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], rbx ; +0x0, 0x18004ede0 mov [rsp+arg_0], rcx ; +0x5, 0x18004ede5 push rbp ; +0xa, 0x18004edea push rsi ; +0xb, 0x18004edeb push rdi ; +0xc, 0x18004edec push r12 ; +0xd, 0x18004eded push r13 ; +0xf, 0x18004edef push r14 ; +0x11, 0x18004edf1 push r15 ; +0x13, 0x18004edf3 sub rsp, 20h ; +0x15, 0x18004edf5 mov r12, r8 ; +0x19, 0x18004edf9 mov rbx, rdx ; +0x1c, 0x18004edfc mov esi, 1 ; +0x1f, 0x18004edff xor edi, edi ; +0x24, 0x18004ee04 mov edx, esi ; +0x26, 0x18004ee06 mov r8d, 714h ; +0x28, 0x18004ee08 mov r13d, edi ; +0x2e, 0x18004ee0e call sub_180033C30 ; +0x31, 0x18004ee11 mov r15, rax ; +0x36, 0x18004ee16 mov rax, [rbx+20h] ; +0x39, 0x18004ee19 mov [rsp+58h+arg_8], rax ; +0x3d, 0x18004ee1d test r15, r15 ; +0x42, 0x18004ee22 jz loc_18004EFB6 ; +0x45, 0x18004ee25 lea edx, [rdi+18h] ; +0x4b, 0x18004ee2b mov rcx, r12 ; +0x4e, 0x18004ee2e call sub_180048210 ; +0x51, 0x18004ee31 lea edx, [rdi+18h] ; +0x56, 0x18004ee36 mov [r15], eax ; +0x59, 0x18004ee39 mov rcx, r12 ; +0x5c, 0x18004ee3c call sub_180048210 ; +0x5f, 0x18004ee3f lea edx, [rdi+18h] ; +0x64, 0x18004ee44 mov [r15+4], eax ; +0x67, 0x18004ee47 mov rcx, r12 ; +0x6b, 0x18004ee4b call sub_180048210 ; +0x6e, 0x18004ee4e inc eax ; +0x73, 0x18004ee53 lea edx, [rdi+6] ; +0x75, 0x18004ee55 mov rcx, r12 ; +0x78, 0x18004ee58 mov [r15+8], eax ; +0x7b, 0x18004ee5b call sub_180048210 ; +0x7f, 0x18004ee5f inc eax ; +0x84, 0x18004ee64 lea edx, [rdi+8] ; +0x86, 0x18004ee66 mov rcx, r12 ; +0x89, 0x18004ee69 mov [r15+0Ch], eax ; +0x8c, 0x18004ee6c call sub_180048210 ; +0x90, 0x18004ee70 mov [r15+10h], eax ; +0x95, 0x18004ee75 test eax, eax ; +0x99, 0x18004ee79 js loc_18004EF99 ; +0x9b, 0x18004ee7b mov ebp, edi ; +0xa1, 0x18004ee81 cmp [r15+0Ch], edi ; +0xa3, 0x18004ee83 jle short loc_18004EEF9 ; +0xa7, 0x18004ee87 lea r14, [r15+14h] ; +0xa9, 0x18004ee89 nop dword ptr [rax] ; +0xad, 0x18004ee8d mov edx, 3 ; +0xb0, 0x18004ee90 mov rcx, r12 ; +0xb5, 0x18004ee95 call sub_180048210 ; +0xb8, 0x18004ee98 mov edx, esi ; +0xbd, 0x18004ee9d mov rcx, r12 ; +0xbf, 0x18004ee9f mov ebx, eax ; +0xc2, 0x18004eea2 call sub_180048210 ; +0xc4, 0x18004eea4 test eax, eax ; +0xc9, 0x18004eea9 js loc_18004EF99 ; +0xcb, 0x18004eeab jz short loc_18004EED1 ; +0xd1, 0x18004eeb1 mov edx, 5 ; +0xd3, 0x18004eeb3 mov rcx, r12 ; +0xd8, 0x18004eeb8 call sub_180048210 ; +0xdb, 0x18004eebb test eax, eax ; +0xe0, 0x18004eec0 js loc_18004EF99 ; +0xe2, 0x18004eec2 lea eax, ds:0[rax*8] ; +0xe8, 0x18004eec8 or ebx, eax ; +0xef, 0x18004eecf mov [r14], ebx ; +0xf1, 0x18004eed1 mov ecx, edi ; +0xf4, 0x18004eed4 test ebx, ebx ; +0xf6, 0x18004eed6 jz short loc_18004EEEA ; +0xf8, 0x18004eed8 nop word ptr [rax+rax+00h] ; +0xfa, 0x18004eeda mov eax, ebx ; +0x100, 0x18004eee0 and eax, esi ; +0x102, 0x18004eee2 add ecx, eax ; +0x104, 0x18004eee4 shr ebx, 1 ; +0x106, 0x18004eee6 jnz short loc_18004EEE0 ; +0x108, 0x18004eee8 add r13d, ecx ; +0x10a, 0x18004eeea inc ebp ; +0x10d, 0x18004eeed add r14, 4 ; +0x10f, 0x18004eeef cmp ebp, [r15+0Ch] ; +0x113, 0x18004eef3 jl short loc_18004EE90 ; +0x117, 0x18004eef7 movsxd rbp, r13d ; +0x119, 0x18004eef9 test r13d, r13d ; +0x11c, 0x18004eefc jle short loc_18004EF30 ; +0x11f, 0x18004eeff mov rbx, rdi ; +0x121, 0x18004ef01 lea r14, [r15+114h] ; +0x124, 0x18004ef04 nop dword ptr [rax+rax+00h] ; +0x12b, 0x18004ef0b mov edx, 8 ; +0x130, 0x18004ef10 mov rcx, r12 ; +0x135, 0x18004ef15 call sub_180048210 ; +0x138, 0x18004ef18 test eax, eax ; +0x13d, 0x18004ef1d js short loc_18004EF99 ; +0x13f, 0x18004ef1f mov [r14], eax ; +0x141, 0x18004ef21 inc rbx ; +0x144, 0x18004ef24 add r14, 4 ; +0x147, 0x18004ef27 cmp rbx, rbp ; +0x14b, 0x18004ef2b jl short loc_18004EF10 ; +0x14e, 0x18004ef2e mov r10, [rsp+58h+arg_8] ; +0x150, 0x18004ef30 movsxd r9, dword ptr [r15+10h] ; +0x155, 0x18004ef35 mov r8d, [r10+18h] ; +0x159, 0x18004ef39 cmp r9d, r8d ; +0x15d, 0x18004ef3d jge short loc_18004EF99 ; +0x160, 0x18004ef40 test r13d, r13d ; +0x162, 0x18004ef42 jle short loc_18004EF72 ; +0x165, 0x18004ef45 lea rdx, [r15+114h] ; +0x167, 0x18004ef47 xchg ax, ax ; +0x16e, 0x18004ef4e movsxd rax, dword ptr [rdx] ; +0x170, 0x18004ef50 cmp eax, r8d ; +0x173, 0x18004ef53 jge short loc_18004EF99 ; +0x176, 0x18004ef56 mov rcx, [r10+rax*8+0B20h] ; +0x178, 0x18004ef58 cmp dword ptr [rcx+10h], 0 ; +0x180, 0x18004ef60 jz short loc_18004EF99 ; +0x184, 0x18004ef64 inc rdi ; +0x186, 0x18004ef66 add rdx, 4 ; +0x189, 0x18004ef69 cmp rdi, rbp ; +0x18d, 0x18004ef6d jl short loc_18004EF50 ; +0x190, 0x18004ef70 mov rcx, [r10+r9*8+0B20h] ; +0x192, 0x18004ef72 mov eax, [rcx] ; +0x19a, 0x18004ef7a mov edx, [rcx+4] ; +0x19c, 0x18004ef7c test eax, eax ; +0x19f, 0x18004ef7f jle short loc_18004EF94 ; +0x1a1, 0x18004ef81 mov ecx, [r15+0Ch] ; +0x1a3, 0x18004ef83 imul esi, ecx ; +0x1a7, 0x18004ef87 cmp esi, edx ; +0x1aa, 0x18004ef8a jg short loc_18004EF99 ; +0x1ac, 0x18004ef8c dec eax ; +0x1ae, 0x18004ef8e test eax, eax ; +0x1b0, 0x18004ef90 jg short loc_18004EF87 ; +0x1b2, 0x18004ef92 mov rax, r15 ; +0x1b4, 0x18004ef94 jmp short loc_18004EFB8 ; +0x1b7, 0x18004ef97 xor edx, edx; Val ; +0x1b9, 0x18004ef99 mov r8d, 714h; Size ; +0x1bb, 0x18004ef9b mov rcx, r15; void * ; +0x1c1, 0x18004efa1 call memset ; +0x1c4, 0x18004efa4 mov rcx, [rsp+58h+arg_0] ; +0x1c9, 0x18004efa9 mov rdx, r15 ; +0x1ce, 0x18004efae call sub_180033C90 ; +0x1d1, 0x18004efb1 xor eax, eax ; +0x1d6, 0x18004efb6 mov rbx, [rsp+58h+arg_10] ; +0x1d8, 0x18004efb8 add rsp, 20h ; +0x1dd, 0x18004efbd pop r15 ; +0x1e1, 0x18004efc1 pop r14 ; +0x1e3, 0x18004efc3 pop r13 ; +0x1e5, 0x18004efc5 pop r12 ; +0x1e7, 0x18004efc7 pop rdi ; +0x1e9, 0x18004efc9 pop rsi ; +0x1ea, 0x18004efca pop rbp ; +0x1eb, 0x18004efcb retn ; +0x1ec, 0x18004efcc