; ; sub_18004A6B0 from 0x18004a6b0 to 0x18004a839 (393 bytes) ; ; 2 xrefs: ; > sub_180049840 @ 0x18004984f ; > @ 0x1801f8484 ; ; 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, 0x18004a6b0 mov [rsp+arg_8], rbp ; +0x5, 0x18004a6b5 mov [rsp+arg_10], rsi ; +0xa, 0x18004a6ba push rdi ; +0xf, 0x18004a6bf push r14 ; +0x10, 0x18004a6c0 push r15 ; +0x12, 0x18004a6c2 sub rsp, 20h ; +0x14, 0x18004a6c4 mov ebx, [rcx+44h] ; +0x18, 0x18004a6c8 mov rbp, rdx ; +0x1b, 0x18004a6cb mov edx, [rcx+40h] ; +0x1e, 0x18004a6ce mov r14, rcx ; +0x21, 0x18004a6d1 mov rcx, rbp ; +0x24, 0x18004a6d4 call sub_180048130 ; +0x27, 0x18004a6d7 xor r15d, r15d ; +0x2c, 0x18004a6dc test eax, eax ; +0x2f, 0x18004a6df js short loc_18004A729 ; +0x31, 0x18004a6e1 movsxd r8, eax ; +0x33, 0x18004a6e3 mov rax, [r14+38h] ; +0x36, 0x18004a6e6 movsxd rcx, dword ptr [rax+r8*4] ; +0x3a, 0x18004a6ea test ecx, ecx ; +0x3e, 0x18004a6ee jns short loc_18004A70B ; +0x40, 0x18004a6f0 mov esi, [r14+8] ; +0x42, 0x18004a6f2 mov edi, ecx ; +0x46, 0x18004a6f6 sar edi, 0Fh ; +0x48, 0x18004a6f8 and ecx, 7FFFh ; +0x4b, 0x18004a6fb and edi, 7FFFh ; +0x51, 0x18004a701 sub esi, ecx ; +0x57, 0x18004a707 jmp short loc_18004A730 ; +0x59, 0x18004a709 mov rdx, rcx ; +0x5b, 0x18004a70b lea ebx, [rcx-1] ; +0x5e, 0x18004a70e mov rcx, [r14+30h] ; +0x61, 0x18004a711 movsx edx, byte ptr [rcx+rdx-1] ; +0x65, 0x18004a715 mov rcx, rbp ; +0x6a, 0x18004a71a call sub_1800480B0 ; +0x6d, 0x18004a71d mov eax, ebx ; +0x72, 0x18004a722 jmp loc_18004A820 ; +0x74, 0x18004a724 mov esi, [r14+8] ; +0x79, 0x18004a729 mov edi, r15d ; +0x7d, 0x18004a72d mov edx, ebx ; +0x80, 0x18004a730 mov rcx, rbp ; +0x82, 0x18004a732 call sub_180048130 ; +0x85, 0x18004a735 mov edx, eax ; +0x8a, 0x18004a73a test eax, eax ; +0x8c, 0x18004a73c jns short loc_18004A75B ; +0x8e, 0x18004a73e cmp ebx, 1 ; +0x90, 0x18004a740 jle loc_18004A81B ; +0x93, 0x18004a743 dec ebx ; +0x99, 0x18004a749 mov rcx, rbp ; +0x9b, 0x18004a74b mov edx, ebx ; +0x9e, 0x18004a74e call sub_180048130 ; +0xa0, 0x18004a750 mov edx, eax ; +0xa5, 0x18004a755 test eax, eax ; +0xa7, 0x18004a757 js short loc_18004A740 ; +0xa9, 0x18004a759 rol edx, 10h ; +0xab, 0x18004a75b mov ecx, edx ; +0xae, 0x18004a75e mov eax, edx ; +0xb0, 0x18004a760 shr ecx, 8 ; +0xb2, 0x18004a762 shl eax, 8 ; +0xb5, 0x18004a765 xor ecx, eax ; +0xb8, 0x18004a768 shl edx, 8 ; +0xba, 0x18004a76a and ecx, 0FF00FFh ; +0xbd, 0x18004a76d xor ecx, edx ; +0xc3, 0x18004a773 mov edx, ecx ; +0xc5, 0x18004a775 mov eax, ecx ; +0xc7, 0x18004a777 shl eax, 4 ; +0xc9, 0x18004a779 shl ecx, 4 ; +0xcc, 0x18004a77c shr edx, 4 ; +0xcf, 0x18004a77f xor edx, eax ; +0xd2, 0x18004a782 and edx, 0F0F0F0Fh ; +0xd4, 0x18004a784 xor edx, ecx ; +0xda, 0x18004a78a mov ecx, edx ; +0xdc, 0x18004a78c shr ecx, 2 ; +0xde, 0x18004a78e lea eax, ds:0[rdx*4] ; +0xe1, 0x18004a791 xor ecx, eax ; +0xe8, 0x18004a798 lea eax, ds:0[rdx*4] ; +0xea, 0x18004a79a and ecx, 33333333h ; +0xf1, 0x18004a7a1 xor ecx, eax ; +0xf7, 0x18004a7a7 mov r9d, ecx ; +0xf9, 0x18004a7a9 shr r9d, 1 ; +0xfc, 0x18004a7ac lea eax, [rcx+rcx] ; +0xff, 0x18004a7af xor r9d, eax ; +0x102, 0x18004a7b2 lea eax, [rcx+rcx] ; +0x105, 0x18004a7b5 and r9d, 55555555h ; +0x108, 0x18004a7b8 xor r9d, eax ; +0x10f, 0x18004a7bf mov eax, esi ; +0x112, 0x18004a7c2 sub eax, edi ; +0x114, 0x18004a7c4 cmp eax, 1 ; +0x116, 0x18004a7c6 jle short loc_18004A7F9 ; +0x119, 0x18004a7c9 mov r10, [r14+20h] ; +0x11b, 0x18004a7cb nop ; +0x11f, 0x18004a7cf shr eax, 1 ; +0x120, 0x18004a7d0 lea ecx, [rax+rdi] ; +0x122, 0x18004a7d2 movsxd rdx, ecx ; +0x125, 0x18004a7d5 mov ecx, eax ; +0x128, 0x18004a7d8 cmp [r10+rdx*4], r9d ; +0x12a, 0x18004a7da cmova ecx, r15d ; +0x12e, 0x18004a7de add edi, ecx ; +0x132, 0x18004a7e2 mov ecx, r15d ; +0x134, 0x18004a7e4 cmp [r10+rdx*4], r9d ; +0x137, 0x18004a7e7 cmova ecx, eax ; +0x13b, 0x18004a7eb sub esi, ecx ; +0x13e, 0x18004a7ee mov eax, esi ; +0x140, 0x18004a7f0 sub eax, edi ; +0x142, 0x18004a7f2 cmp eax, 1 ; +0x144, 0x18004a7f4 jg short loc_18004A7D0 ; +0x147, 0x18004a7f7 mov rcx, [r14+30h] ; +0x149, 0x18004a7f9 movsxd rdx, edi ; +0x14d, 0x18004a7fd movsx edx, byte ptr [rcx+rdx] ; +0x150, 0x18004a800 mov rcx, rbp ; +0x154, 0x18004a804 cmp edx, ebx ; +0x157, 0x18004a807 jg short loc_18004A814 ; +0x159, 0x18004a809 call sub_1800480B0 ; +0x15b, 0x18004a80b mov eax, edi ; +0x160, 0x18004a810 jmp short loc_18004A820 ; +0x162, 0x18004a812 mov edx, ebx ; +0x164, 0x18004a814 call sub_1800480B0 ; +0x166, 0x18004a816 mov eax, 0FFFFFFFFh ; +0x16b, 0x18004a81b mov rbx, [rsp+38h+arg_0] ; +0x170, 0x18004a820 mov rbp, [rsp+38h+arg_8] ; +0x175, 0x18004a825 mov rsi, [rsp+38h+arg_10] ; +0x17a, 0x18004a82a add rsp, 20h ; +0x17f, 0x18004a82f pop r15 ; +0x183, 0x18004a833 pop r14 ; +0x185, 0x18004a835 pop rdi ; +0x187, 0x18004a837 retn ; +0x188, 0x18004a838