; ; sub_180052E90 from 0x180052e90 to 0x180053222 (914 bytes) ; ; 4 xrefs: ; > sub_180050C10 @ 0x180050d6e ; > sub_1800523F0 @ 0x18005290a ; > sub_180052A90 @ 0x180052cd9 ; > @ 0x1801f8b2c ; ; 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:18 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x180052e90 mov [rsp+arg_18], r9 ; +0x5, 0x180052e95 mov [rsp+arg_10], r8 ; +0xa, 0x180052e9a push rbp ; +0xf, 0x180052e9f push rsi ; +0x10, 0x180052ea0 push rdi ; +0x11, 0x180052ea1 push r12 ; +0x12, 0x180052ea2 push r13 ; +0x14, 0x180052ea4 push r14 ; +0x16, 0x180052ea6 push r15 ; +0x18, 0x180052ea8 sub rsp, 70h ; +0x1a, 0x180052eaa mov rsi, [rsp+0A8h+arg_30] ; +0x1e, 0x180052eae xor r12d, r12d ; +0x26, 0x180052eb6 mov rdi, r9 ; +0x29, 0x180052eb9 mov r13, r8 ; +0x2c, 0x180052ebc mov r14, rdx ; +0x2f, 0x180052ebf mov r15, rcx ; +0x32, 0x180052ec2 mov rbx, 0FFFFFFFFFFFFFF75h ; +0x35, 0x180052ec5 test rsi, rsi ; +0x3c, 0x180052ecc jnz short loc_180052F09 ; +0x3f, 0x180052ecf mov r9d, 2134h ; +0x41, 0x180052ed1 lea r8, [rsp+0A8h+var_88] ; +0x47, 0x180052ed7 call sub_180053230 ; +0x4c, 0x180052edc cmp rax, 0FFFFFFFFFFFFFF80h ; +0x51, 0x180052ee1 jnz short loc_180052EEC ; +0x55, 0x180052ee5 jmp loc_180053179 ; +0x57, 0x180052ee7 cmp rax, rbx ; +0x5c, 0x180052eec jz loc_180053177 ; +0x5f, 0x180052eef test rax, rax ; +0x65, 0x180052ef5 jns short loc_180052F04 ; +0x68, 0x180052ef8 mov eax, 0FFFFFF7Ch ; +0x6a, 0x180052efa jmp loc_180053179 ; +0x6f, 0x180052eff lea rsi, [rsp+0A8h+var_88] ; +0x74, 0x180052f04 mov rdx, r13 ; +0x79, 0x180052f09 mov rcx, r15 ; +0x7c, 0x180052f0c call sub_18004C780 ; +0x7f, 0x180052f0f test eax, eax ; +0x84, 0x180052f14 jnz loc_180053177 ; +0x86, 0x180052f16 mov rcx, rdi ; +0x8c, 0x180052f1c call sub_18004C580 ; +0x8f, 0x180052f1f mov rcx, rsi ; +0x94, 0x180052f24 mov dword ptr [r14+80h], 2 ; +0x97, 0x180052f27 call sub_18004B880 ; +0xa2, 0x180052f32 test eax, eax ; +0xa7, 0x180052f37 jz loc_1800530CA ; +0xa9, 0x180052f39 mov rbp, [rsp+0A8h+arg_28] ; +0xaf, 0x180052f3f mov r13, [rsp+0A8h+arg_20] ; +0xb7, 0x180052f47 nop ; +0xbf, 0x180052f4f test r13, r13 ; +0xc0, 0x180052f50 jz loc_180052FDE ; +0xc3, 0x180052f53 mov edi, [rbp+0] ; +0xc9, 0x180052f59 mov rcx, rsi ; +0xcc, 0x180052f5c mov rbp, [r13+0] ; +0xcf, 0x180052f5f call sub_18004B910 ; +0xd3, 0x180052f63 test rbp, rbp ; +0xd8, 0x180052f68 jz short loc_180052F84 ; +0xdb, 0x180052f6b test edi, edi ; +0xdd, 0x180052f6d jz short loc_180052F84 ; +0xdf, 0x180052f6f dec edi ; +0xe1, 0x180052f71 cmp [rbp+0], eax ; +0xe3, 0x180052f73 jz loc_180053127 ; +0xe6, 0x180052f76 add rbp, 4 ; +0xec, 0x180052f7c test edi, edi ; +0xf0, 0x180052f80 jnz short loc_180052F71 ; +0xf2, 0x180052f82 mov rcx, rsi ; +0xf4, 0x180052f84 call sub_18004B910 ; +0xf7, 0x180052f87 mov rbp, [rsp+0A8h+arg_28] ; +0xfc, 0x180052f8c mov edi, eax ; +0x104, 0x180052f94 mov rcx, r15 ; +0x106, 0x180052f96 mov r8d, [rbp+0] ; +0x109, 0x180052f99 inc r8d ; +0x10d, 0x180052f9d mov [rbp+0], r8d ; +0x110, 0x180052fa0 mov rdx, [r13+0] ; +0x114, 0x180052fa4 test rdx, rdx ; +0x118, 0x180052fa8 jz short loc_180052FBC ; +0x11b, 0x180052fab lea r8d, ds:0[r8*4] ; +0x11d, 0x180052fad call sub_180033D20 ; +0x125, 0x180052fb5 jmp short loc_180052FC6 ; +0x12a, 0x180052fba mov edx, 4 ; +0x12c, 0x180052fbc call sub_180033CC0 ; +0x131, 0x180052fc1 mov [r13+0], rax ; +0x136, 0x180052fc6 mov rcx, rax ; +0x13a, 0x180052fca test rax, rax ; +0x13d, 0x180052fcd jz loc_180053177 ; +0x140, 0x180052fd0 movsxd rax, dword ptr [rbp+0] ; +0x146, 0x180052fd6 mov [rcx+rax*4-4], edi ; +0x14a, 0x180052fda cmp dword ptr [r14+80h], 3 ; +0x14e, 0x180052fde jge short loc_180053063 ; +0x156, 0x180052fe6 mov rcx, rsi ; +0x158, 0x180052fe8 call sub_18004B910 ; +0x15b, 0x180052feb mov edx, eax ; +0x160, 0x180052ff0 lea rcx, [r14+98h] ; +0x162, 0x180052ff2 call sub_18004C040 ; +0x169, 0x180052ff9 mov r8, rsi ; +0x16e, 0x180052ffe lea rdx, [r14+98h] ; +0x171, 0x180053001 mov rcx, r15 ; +0x178, 0x180053008 call sub_18004BBC0 ; +0x17b, 0x18005300b lea rdx, [rsp+0A8h+var_68] ; +0x180, 0x180053010 lea rcx, [r14+98h] ; +0x185, 0x180053015 call sub_18004BAA0 ; +0x18c, 0x18005301c test eax, eax ; +0x191, 0x180053021 jle short loc_180053063 ; +0x193, 0x180053023 lea rcx, [rsp+0A8h+var_68] ; +0x195, 0x180053025 call sub_18004CA10 ; +0x19a, 0x18005302a test eax, eax ; +0x19f, 0x18005302f jz short loc_180053063 ; +0x1a1, 0x180053031 mov r8, [rsp+0A8h+arg_18] ; +0x1a3, 0x180053033 lea r9, [rsp+0A8h+var_68] ; +0x1ab, 0x18005303b mov rdx, [rsp+0A8h+arg_10] ; +0x1b0, 0x180053040 mov rcx, r15 ; +0x1b8, 0x180053048 mov dword ptr [r14+80h], 3 ; +0x1bb, 0x18005304b call sub_18004C7C0 ; +0x1c6, 0x180053056 test eax, eax ; +0x1cb, 0x18005305b jnz loc_180053147 ; +0x1cd, 0x18005305d mov r9d, 2134h ; +0x1d3, 0x180053063 mov r8, rsi ; +0x1d9, 0x180053069 mov rdx, r14 ; +0x1dc, 0x18005306c mov rcx, r15 ; +0x1df, 0x18005306f call sub_180053230 ; +0x1e2, 0x180053072 cmp rax, 0FFFFFFFFFFFFFF80h ; +0x1e7, 0x180053077 jz loc_1800531AF ; +0x1eb, 0x18005307b cmp rax, rbx ; +0x1f1, 0x180053081 jz loc_18005314C ; +0x1f4, 0x180053084 test rax, rax ; +0x1fa, 0x18005308a js loc_1800531A8 ; +0x1fd, 0x18005308d cmp dword ptr [r14+80h], 3 ; +0x203, 0x180053093 jnz short loc_1800530B2 ; +0x20b, 0x18005309b mov rcx, rsi ; +0x20d, 0x18005309d call sub_18004B910 ; +0x210, 0x1800530a0 cmp [r14+1F8h], eax ; +0x215, 0x1800530a5 jz loc_180053191 ; +0x21c, 0x1800530ac mov rcx, rsi ; +0x222, 0x1800530b2 call sub_18004B880 ; +0x225, 0x1800530b5 test eax, eax ; +0x22a, 0x1800530ba jnz loc_180052F50 ; +0x22c, 0x1800530bc mov r13, [rsp+0A8h+arg_10] ; +0x232, 0x1800530c2 cmp dword ptr [r14+80h], 3 ; +0x23a, 0x1800530ca jnz loc_1800531A8 ; +0x242, 0x1800530d2 mov edi, r12d ; +0x248, 0x1800530d8 nop dword ptr [rax+rax+00h] ; +0x24b, 0x1800530db lea rdx, [rsp+0A8h+var_68] ; +0x250, 0x1800530e0 lea rcx, [r14+98h] ; +0x255, 0x1800530e5 call sub_18004BAA0 ; +0x25c, 0x1800530ec test eax, eax ; +0x261, 0x1800530f1 jz loc_1800531B6 ; +0x263, 0x1800530f3 cmp eax, 0FFFFFFFFh ; +0x269, 0x1800530f9 jz short loc_180053147 ; +0x26c, 0x1800530fc mov r8, [rsp+0A8h+arg_18] ; +0x26e, 0x1800530fe lea r9, [rsp+0A8h+var_68] ; +0x276, 0x180053106 mov rdx, r13 ; +0x27b, 0x18005310b mov rcx, r15 ; +0x27e, 0x18005310e call sub_18004C7C0 ; +0x281, 0x180053111 mov ebx, eax ; +0x286, 0x180053116 test eax, eax ; +0x288, 0x180053118 jnz short loc_18005314C ; +0x28a, 0x18005311a inc edi ; +0x28c, 0x18005311c cmp edi, 2 ; +0x28e, 0x18005311e jl short loc_1800530E0 ; +0x291, 0x180053121 xor eax, eax ; +0x293, 0x180053123 jmp short loc_180053179 ; +0x295, 0x180053125 mov rdx, [r13+0] ; +0x297, 0x180053127 test rdx, rdx ; +0x29b, 0x18005312b jz short loc_180053138 ; +0x29e, 0x18005312e mov rcx, r15 ; +0x2a0, 0x180053130 call sub_180033C90 ; +0x2a3, 0x180053133 mov rax, [rsp+0A8h+arg_28] ; +0x2a8, 0x180053138 mov [r13+0], r12 ; +0x2b0, 0x180053140 mov [rax], r12d ; +0x2b4, 0x180053144 mov ebx, 0FFFFFF7Bh ; +0x2b7, 0x180053147 mov rdx, [rsp+0A8h+arg_10] ; +0x2bc, 0x18005314c mov rcx, r15 ; +0x2c4, 0x180053154 call sub_18004C5B0 ; +0x2c7, 0x180053157 mov rdx, [rsp+0A8h+arg_18] ; +0x2cc, 0x18005315c mov rcx, r15 ; +0x2d4, 0x180053164 call sub_18004C4D0 ; +0x2d7, 0x180053167 mov dword ptr [r14+80h], 2 ; +0x2dc, 0x18005316c mov eax, ebx ; +0x2e7, 0x180053177 mov rbx, [rsp+0A8h+arg_0] ; +0x2e9, 0x180053179 add rsp, 70h ; +0x2f1, 0x180053181 pop r15 ; +0x2f5, 0x180053185 pop r14 ; +0x2f7, 0x180053187 pop r13 ; +0x2f9, 0x180053189 pop r12 ; +0x2fb, 0x18005318b pop rdi ; +0x2fd, 0x18005318d pop rsi ; +0x2fe, 0x18005318e pop rbp ; +0x2ff, 0x18005318f retn ; +0x300, 0x180053190 lea rdx, [r14+98h] ; +0x301, 0x180053191 mov r8, rsi ; +0x308, 0x180053198 mov rcx, r15 ; +0x30b, 0x18005319b call sub_18004BBC0 ; +0x30e, 0x18005319e jmp loc_1800530C2 ; +0x313, 0x1800531a3 mov ebx, 0FFFFFF7Ch ; +0x318, 0x1800531a8 jmp short loc_18005314C ; +0x31d, 0x1800531ad mov ebx, 0FFFFFF80h ; +0x31f, 0x1800531af jmp short loc_18005314C ; +0x324, 0x1800531b4 cmp edi, 2 ; +0x326, 0x1800531b6 jge loc_180053123 ; +0x329, 0x1800531b9 nop ; +0x32f, 0x1800531bf mov r9d, 2134h ; +0x330, 0x1800531c0 mov r8, rsi ; +0x336, 0x1800531c6 mov rdx, r14 ; +0x339, 0x1800531c9 mov rcx, r15 ; +0x33c, 0x1800531cc call sub_180053230 ; +0x33f, 0x1800531cf test rax, rax ; +0x344, 0x1800531d4 js loc_180053147 ; +0x347, 0x1800531d7 mov rcx, rsi ; +0x34d, 0x1800531dd call sub_18004B910 ; +0x350, 0x1800531e0 cmp [r14+1F8h], eax ; +0x355, 0x1800531e5 jz short loc_18005320B ; +0x35c, 0x1800531ec mov rcx, rsi ; +0x35e, 0x1800531ee call sub_18004B880 ; +0x361, 0x1800531f1 test eax, eax ; +0x366, 0x1800531f6 jz short loc_1800531C0 ; +0x368, 0x1800531f8 test r12d, r12d ; +0x36a, 0x1800531fa jnz loc_180053147 ; +0x36d, 0x1800531fd mov r12d, 1 ; +0x373, 0x180053203 jmp short loc_1800531C0 ; +0x379, 0x180053209 mov r8, rsi ; +0x37b, 0x18005320b lea rdx, [r14+98h] ; +0x37e, 0x18005320e mov rcx, r15 ; +0x385, 0x180053215 call sub_18004BBC0 ; +0x388, 0x180053218 jmp loc_1800530E0 ; +0x38d, 0x18005321d