; ; sub_18000F320 from 0x18000f320 to 0x18000f6ab (907 bytes) ; ; 3 xrefs: ; > sub_1800CB7C0 @ 0x1800cb7d0 ; > @ 0x18016ca20 ; > @ 0x1801f6d50 ; ; 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_0], rbx ; +0x0, 0x18000f320 push rbp ; +0x5, 0x18000f325 push rsi ; +0x6, 0x18000f326 push rdi ; +0x7, 0x18000f327 push r12 ; +0x8, 0x18000f328 push r13 ; +0xa, 0x18000f32a push r14 ; +0xc, 0x18000f32c push r15 ; +0xe, 0x18000f32e sub rsp, 60h ; +0x10, 0x18000f330 mov rax, [rcx+60h] ; +0x14, 0x18000f334 mov rbp, rdx ; +0x18, 0x18000f338 mov r12, [rcx+70h] ; +0x1b, 0x18000f33b mov rbx, rcx ; +0x1f, 0x18000f33f test rax, rax ; +0x22, 0x18000f342 jz loc_18000F43F ; +0x25, 0x18000f345 cmp rax, [rcx+68h] ; +0x2b, 0x18000f34b jz loc_18000F6A4 ; +0x2f, 0x18000f34f xor edi, edi ; +0x35, 0x18000f355 test rdx, rdx ; +0x37, 0x18000f357 jnz short loc_18000F3D5 ; +0x3a, 0x18000f35a mov rax, [rcx] ; +0x3c, 0x18000f35c lea rdx, [rsp+98h+arg_18] ; +0x3f, 0x18000f35f call qword ptr [rax+128h] ; +0x47, 0x18000f367 test eax, eax ; +0x4d, 0x18000f36d jnz loc_18000F444 ; +0x4f, 0x18000f36f mov esi, edi ; +0x55, 0x18000f375 cmp dword ptr [rsp+98h+arg_18], edi ; +0x57, 0x18000f377 jle loc_18000F690 ; +0x5e, 0x18000f37e nop dword ptr [rax+00h] ; +0x64, 0x18000f384 nop dword ptr [rax+rax+00000000h] ; +0x68, 0x18000f388 mov rax, [rbx] ; +0x70, 0x18000f390 lea r8, [rsp+98h+var_40] ; +0x73, 0x18000f393 mov edx, edi ; +0x78, 0x18000f398 mov rcx, rbx ; +0x7a, 0x18000f39a call qword ptr [rax+120h] ; +0x7d, 0x18000f39d test eax, eax ; +0x83, 0x18000f3a3 jnz loc_18000F444 ; +0x85, 0x18000f3a5 mov rdx, [rsp+98h+var_40] ; +0x8b, 0x18000f3ab cmp rdx, r12 ; +0x90, 0x18000f3b0 jnz short loc_18000F3B9 ; +0x93, 0x18000f3b3 inc edi ; +0x95, 0x18000f3b5 jmp short loc_18000F3C5 ; +0x97, 0x18000f3b7 mov rax, [rbx] ; +0x99, 0x18000f3b9 mov rcx, rbx ; +0x9c, 0x18000f3bc call qword ptr [rax+118h] ; +0x9f, 0x18000f3bf inc esi ; +0xa5, 0x18000f3c5 cmp esi, dword ptr [rsp+98h+arg_18] ; +0xa7, 0x18000f3c7 jl short loc_18000F390 ; +0xae, 0x18000f3ce jmp loc_18000F690 ; +0xb0, 0x18000f3d0 mov eax, [rdx+64h] ; +0xb5, 0x18000f3d5 shr eax, 5 ; +0xb8, 0x18000f3d8 mov [rsp+98h+var_58], rdi ; +0xbb, 0x18000f3db mov [rsp+98h+var_48], rdi ; +0xc0, 0x18000f3e0 nop ; +0xc5, 0x18000f3e5 test al, 1 ; +0xc6, 0x18000f3e6 jz short loc_18000F3F1 ; +0xc8, 0x18000f3e8 mov eax, 0Ah ; +0xca, 0x18000f3ea jmp short loc_18000F444 ; +0xcf, 0x18000f3ef mov rax, [rcx] ; +0xd1, 0x18000f3f1 lea rdx, [rsp+98h+arg_10] ; +0xd4, 0x18000f3f4 call qword ptr [rax+128h] ; +0xdc, 0x18000f3fc test eax, eax ; +0xe2, 0x18000f402 jnz short loc_18000F444 ; +0xe4, 0x18000f404 mov esi, edi ; +0xe6, 0x18000f406 cmp [rsp+98h+arg_10], edi ; +0xe8, 0x18000f408 jle short loc_18000F43F ; +0xef, 0x18000f40f mov rax, [rbx] ; +0xf1, 0x18000f411 lea r8, [rsp+98h+var_50] ; +0xf4, 0x18000f414 mov edx, esi ; +0xf9, 0x18000f419 mov [rsp+98h+var_50], rdi ; +0xfb, 0x18000f41b mov rcx, rbx ; +0x100, 0x18000f420 call qword ptr [rax+120h] ; +0x103, 0x18000f423 test eax, eax ; +0x109, 0x18000f429 jnz short loc_18000F444 ; +0x10b, 0x18000f42b cmp [rsp+98h+var_50], rbp ; +0x10d, 0x18000f42d jz short loc_18000F45C ; +0x112, 0x18000f432 inc esi ; +0x114, 0x18000f434 cmp esi, [rsp+98h+arg_10] ; +0x116, 0x18000f436 jl short loc_18000F411 ; +0x11d, 0x18000f43d mov eax, 9 ; +0x11f, 0x18000f43f mov rbx, [rsp+98h+arg_0] ; +0x124, 0x18000f444 add rsp, 60h ; +0x12c, 0x18000f44c pop r15 ; +0x130, 0x18000f450 pop r14 ; +0x132, 0x18000f452 pop r13 ; +0x134, 0x18000f454 pop r12 ; +0x136, 0x18000f456 pop rdi ; +0x138, 0x18000f458 pop rsi ; +0x139, 0x18000f459 pop rbp ; +0x13a, 0x18000f45a retn ; +0x13b, 0x18000f45b mov edx, [rsp+98h+arg_10] ; +0x13c, 0x18000f45c cmp esi, edx ; +0x143, 0x18000f463 jge short loc_18000F43F ; +0x145, 0x18000f465 test esi, esi ; +0x147, 0x18000f467 jnz short loc_18000F475 ; +0x149, 0x18000f469 lea r8, [rsp+98h+var_58] ; +0x14b, 0x18000f46b lea edx, [rsi+1] ; +0x150, 0x18000f470 jmp short loc_18000F484 ; +0x153, 0x18000f473 lea eax, [rdx-1] ; +0x155, 0x18000f475 cmp esi, eax ; +0x158, 0x18000f478 jnz short loc_18000F490 ; +0x15a, 0x18000f47a add edx, 0FFFFFFFEh ; +0x15c, 0x18000f47c lea r8, [rsp+98h+var_48] ; +0x15f, 0x18000f47f mov rax, [rbx] ; +0x164, 0x18000f484 mov rcx, rbx ; +0x167, 0x18000f487 call qword ptr [rax+120h] ; +0x16a, 0x18000f48a mov r14, [rbx+8] ; +0x170, 0x18000f490 xor r13b, r13b ; +0x174, 0x18000f494 test r14, r14 ; +0x177, 0x18000f497 jz short loc_18000F4AC ; +0x17a, 0x18000f49a mov edx, 1 ; +0x17c, 0x18000f49c mov rcx, r14 ; +0x181, 0x18000f4a1 call sub_1801021C0 ; +0x184, 0x18000f4a4 mov r13b, 1 ; +0x189, 0x18000f4a9 lock and dword ptr [rbp+64h], 0FFFFFFBFh ; +0x18c, 0x18000f4ac xor r8d, r8d ; +0x191, 0x18000f4b1 mov [rbp+200h], rdi ; +0x194, 0x18000f4b4 xor edx, edx ; +0x19b, 0x18000f4bb mov rcx, rbp ; +0x19d, 0x18000f4bd call sub_18009B6A0 ; +0x1a0, 0x18000f4c0 mov r15d, eax ; +0x1a5, 0x18000f4c5 test eax, eax ; +0x1a8, 0x18000f4c8 jnz short loc_18000F501 ; +0x1aa, 0x18000f4ca xor r8d, r8d ; +0x1ac, 0x18000f4cc mov rdx, rbp ; +0x1af, 0x18000f4cf mov rcx, rbp ; +0x1b2, 0x18000f4d2 call sub_180098980 ; +0x1b5, 0x18000f4d5 mov r15d, eax ; +0x1ba, 0x18000f4da test eax, eax ; +0x1bd, 0x18000f4dd jnz short loc_18000F501 ; +0x1bf, 0x18000f4df mov rdx, [rsp+98h+var_58] ; +0x1c1, 0x18000f4e1 test rdx, rdx ; +0x1c6, 0x18000f4e6 jz short loc_18000F520 ; +0x1c9, 0x18000f4e9 add rdx, 8 ; +0x1cb, 0x18000f4eb xor r8d, r8d ; +0x1cf, 0x18000f4ef mov rcx, r12 ; +0x1d2, 0x18000f4f2 call sub_180069950 ; +0x1d5, 0x18000f4f5 mov r15d, eax ; +0x1da, 0x18000f4fa test eax, eax ; +0x1dd, 0x18000f4fd jz short loc_18000F520 ; +0x1df, 0x18000f4ff test r13b, r13b ; +0x1e1, 0x18000f501 jz short loc_18000F518 ; +0x1e4, 0x18000f504 test r14, r14 ; +0x1e6, 0x18000f506 jz short loc_18000F518 ; +0x1e9, 0x18000f509 mov edx, 1 ; +0x1eb, 0x18000f50b mov rcx, r14 ; +0x1f0, 0x18000f510 call sub_180102300 ; +0x1f3, 0x18000f513 mov eax, r15d ; +0x1f8, 0x18000f518 jmp loc_18000F444 ; +0x1fb, 0x18000f51b test r13b, r13b ; +0x200, 0x18000f520 jz short loc_18000F537 ; +0x203, 0x18000f523 test r14, r14 ; +0x205, 0x18000f525 jz short loc_18000F537 ; +0x208, 0x18000f528 mov edx, 1 ; +0x20a, 0x18000f52a mov rcx, r14 ; +0x20f, 0x18000f52f call sub_180102300 ; +0x212, 0x18000f532 lea rdx, [rbp+90h] ; +0x217, 0x18000f537 mov rcx, [rdx+8] ; +0x21e, 0x18000f53e lea r8, [rbx+110h] ; +0x222, 0x18000f542 mov rax, [rdx] ; +0x229, 0x18000f549 mov [rcx], rax ; +0x22c, 0x18000f54c mov rcx, [rdx] ; +0x22f, 0x18000f54f mov rax, [rdx+8] ; +0x232, 0x18000f552 mov [rcx+8], rax ; +0x236, 0x18000f556 mov [rdx+8], rdx ; +0x23a, 0x18000f55a mov [rdx], rdx ; +0x23e, 0x18000f55e mov rdx, [r8] ; +0x241, 0x18000f561 cmp rdx, r8 ; +0x244, 0x18000f564 jz short loc_18000F5A6 ; +0x247, 0x18000f567 nop dword ptr [rax+00000000h] ; +0x249, 0x18000f569 mov rcx, [rdx+10h] ; +0x250, 0x18000f570 mov [rsp+98h+arg_18], rcx ; +0x254, 0x18000f574 shr rcx, 10h ; +0x25c, 0x18000f57c movsx eax, cx ; +0x260, 0x18000f580 cmp esi, eax ; +0x263, 0x18000f583 jge short loc_18000F59E ; +0x265, 0x18000f585 dec cx ; +0x267, 0x18000f587 mov word ptr [rsp+98h+arg_18+2], cx ; +0x26a, 0x18000f58a mov rax, [rsp+98h+arg_18] ; +0x272, 0x18000f592 mov [rdx+10h], rax ; +0x27a, 0x18000f59a mov rdx, [rdx] ; +0x27e, 0x18000f59e cmp rdx, r8 ; +0x281, 0x18000f5a1 jnz short loc_18000F570 ; +0x284, 0x18000f5a4 mov edx, [rbx+18h] ; +0x286, 0x18000f5a6 mov r14, rdi ; +0x289, 0x18000f5a9 cmp edx, 2 ; +0x28c, 0x18000f5ac jle loc_18000F639 ; +0x28f, 0x18000f5af mov rcx, [rbx+8] ; +0x295, 0x18000f5b5 lea edx, ds:0FFFFFFFFFFFFFFF8h[rdx*8] ; +0x299, 0x18000f5b9 mov [rsp+98h+var_68], 1 ; +0x2a0, 0x18000f5c0 lea r8, byte_18014572F ; +0x2a5, 0x18000f5c5 add rcx, 10848h ; +0x2ac, 0x18000f5cc mov [rsp+98h+var_70], dil ; +0x2b3, 0x18000f5d3 xor r9d, r9d ; +0x2b8, 0x18000f5d8 mov [rsp+98h+var_78], edi ; +0x2bb, 0x18000f5db call sub_1800B6530 ; +0x2bf, 0x18000f5df mov r14, rax ; +0x2c4, 0x18000f5e4 test rax, rax ; +0x2c7, 0x18000f5e7 jnz short loc_18000F5F5 ; +0x2ca, 0x18000f5ea lea eax, [r14+26h] ; +0x2cc, 0x18000f5ec jmp loc_18000F444 ; +0x2d0, 0x18000f5f0 mov eax, [rbx+18h] ; +0x2d5, 0x18000f5f5 dec eax ; +0x2d8, 0x18000f5f8 test eax, eax ; +0x2da, 0x18000f5fa jle short loc_18000F639 ; +0x2dc, 0x18000f5fc movsxd r10, esi ; +0x2de, 0x18000f5fe mov rcx, rdi ; +0x2e1, 0x18000f601 mov r9, rdi ; +0x2e4, 0x18000f604 nop word ptr [rax+rax+00000000h] ; +0x2e7, 0x18000f607 mov rax, [rbx+10h] ; +0x2f0, 0x18000f610 lea rdx, [rcx+1] ; +0x2f4, 0x18000f614 cmp r9, r10 ; +0x2f8, 0x18000f618 cmovnz rdx, rcx ; +0x2fb, 0x18000f61b inc edi ; +0x2ff, 0x18000f61f mov rcx, [rax+rdx*8] ; +0x301, 0x18000f621 mov [r14+r9*8], rcx ; +0x305, 0x18000f625 inc r9 ; +0x309, 0x18000f629 mov eax, [rbx+18h] ; +0x30c, 0x18000f62c lea rcx, [rdx+1] ; +0x30f, 0x18000f62f dec eax ; +0x313, 0x18000f633 cmp edi, eax ; +0x315, 0x18000f635 jl short loc_18000F610 ; +0x317, 0x18000f637 mov rdx, [rbx+10h] ; +0x319, 0x18000f639 test rdx, rdx ; +0x31d, 0x18000f63d jz short loc_18000F661 ; +0x320, 0x18000f640 mov rcx, [rbx+8] ; +0x322, 0x18000f642 lea r8, byte_18014572F ; +0x326, 0x18000f646 add rcx, 10848h ; +0x32d, 0x18000f64d mov byte ptr [rsp+98h+var_78], 1 ; +0x334, 0x18000f654 xor r9d, r9d ; +0x339, 0x18000f659 call sub_1800B6AA0 ; +0x33c, 0x18000f65c mov rdx, [rsp+98h+var_58] ; +0x341, 0x18000f661 mov r8, [rsp+98h+var_48] ; +0x346, 0x18000f666 mov [rbx+10h], r14 ; +0x34b, 0x18000f66b test rdx, rdx ; +0x34f, 0x18000f66f jnz short loc_18000F679 ; +0x352, 0x18000f672 test r8, r8 ; +0x354, 0x18000f674 jz short loc_18000F68D ; +0x357, 0x18000f677 mov rax, [rbx] ; +0x359, 0x18000f679 mov rcx, rbx ; +0x35c, 0x18000f67c call qword ptr [rax+1E8h] ; +0x35f, 0x18000f67f test eax, eax ; +0x365, 0x18000f685 jnz loc_18000F444 ; +0x367, 0x18000f687 dec dword ptr [rbx+18h] ; +0x36d, 0x18000f68d mov rax, [rbx] ; +0x370, 0x18000f690 mov rcx, rbx ; +0x373, 0x18000f693 call qword ptr [rax+208h] ; +0x376, 0x18000f696 test eax, eax ; +0x37c, 0x18000f69c jnz loc_18000F444 ; +0x37e, 0x18000f69e xor eax, eax ; +0x384, 0x18000f6a4 jmp loc_18000F444 ; +0x386, 0x18000f6a6