; ; sub_180039770 from 0x180039770 to 0x180039868 (248 bytes) ; ; 3 xrefs: ; > sub_1800381A0 @ 0x1800383df ; > sub_1800381A0 @ 0x180038530 ; > @ 0x1801f7cb0 ; ; 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 ; movzx r8d, byte ptr [rcx+106h] ; +0x0, 0x180039770 mov r9, rcx ; +0x8, 0x180039778 mov r10, [rcx+8] ; +0xb, 0x18003977b movzx ecx, r8b ; +0xf, 0x18003977f and cl, 1Fh ; +0x13, 0x180039783 movzx edx, byte ptr [r9+126h] ; +0x16, 0x180039786 and edx, 3 ; +0x1e, 0x18003978e jz short loc_18003980F ; +0x21, 0x180039791 sub edx, 1 ; +0x23, 0x180039793 jz short loc_1800397F6 ; +0x26, 0x180039796 sub edx, 1 ; +0x28, 0x180039798 jz short loc_1800397EF ; +0x2b, 0x18003979b cmp edx, 1 ; +0x2d, 0x18003979d jz short loc_1800397A6 ; +0x30, 0x1800397a0 xor eax, eax ; +0x32, 0x1800397a2 jmp short loc_18003981D ; +0x34, 0x1800397a4 mov r8, [r9] ; +0x36, 0x1800397a6 add r8, 0C10h ; +0x39, 0x1800397a9 mov eax, [r8+4] ; +0x40, 0x1800397b0 mov edx, [r8] ; +0x44, 0x1800397b4 shl edx, 0Bh ; +0x47, 0x1800397b7 xor edx, [r8] ; +0x4a, 0x1800397ba mov [r8], eax ; +0x4d, 0x1800397bd mov eax, [r8+8] ; +0x50, 0x1800397c0 mov [r8+4], eax ; +0x54, 0x1800397c4 mov eax, [r8+0Ch] ; +0x58, 0x1800397c8 mov ecx, eax ; +0x5c, 0x1800397cc shr ecx, 0Bh ; +0x5e, 0x1800397ce xor ecx, edx ; +0x61, 0x1800397d1 mov [r8+8], eax ; +0x63, 0x1800397d3 shr ecx, 8 ; +0x67, 0x1800397d7 xor ecx, eax ; +0x6a, 0x1800397da xor ecx, edx ; +0x6c, 0x1800397dc mov [r8+0Ch], ecx ; +0x6e, 0x1800397de movzx r8d, byte ptr [r9+106h] ; +0x72, 0x1800397e2 movzx eax, cl ; +0x7a, 0x1800397ea jmp short loc_18003981D ; +0x7d, 0x1800397ed mov eax, 0FFh ; +0x7f, 0x1800397ef jmp short loc_18003981D ; +0x84, 0x1800397f4 shl cl, 3 ; +0x86, 0x1800397f6 movzx edx, cl ; +0x89, 0x1800397f9 test r8b, r8b ; +0x8c, 0x1800397fc movzx eax, dl ; +0x8f, 0x1800397ff not al ; +0x92, 0x180039802 movzx ecx, al ; +0x94, 0x180039804 cmovns ecx, edx ; +0x97, 0x180039807 movzx eax, cl ; +0x9a, 0x18003980a jmp short loc_18003981D ; +0x9d, 0x18003980d movzx eax, cl ; +0x9f, 0x18003980f lea rcx, byte_1801AEEE0 ; +0xa2, 0x180039812 movzx eax, byte ptr [rax+rcx] ; +0xa9, 0x180039819 movzx ecx, byte ptr [r9+108h] ; +0xad, 0x18003981d imul ecx, eax ; +0xb5, 0x180039825 shr ecx, 5 ; +0xb8, 0x180039828 and ecx, 0FFFFFFFCh ; +0xbb, 0x18003982b mov eax, ecx ; +0xbe, 0x18003982e neg eax ; +0xc0, 0x180039830 test r8b, r8b ; +0xc2, 0x180039832 cmovs ecx, eax ; +0xc5, 0x180039835 mov [r10+50h], ecx ; +0xc8, 0x180039838 movzx eax, byte ptr [r9+107h] ; +0xcc, 0x18003983c add [r9+106h], al ; +0xd4, 0x180039844 movzx eax, byte ptr [r9+106h] ; +0xdb, 0x18003984b cmp al, 1Fh ; +0xe3, 0x180039853 jle short loc_180039860 ; +0xe5, 0x180039855 sub al, 40h ; '@' ; +0xe7, 0x180039857 mov [r9+106h], al ; +0xe9, 0x180039859 or byte ptr [r10+3Ch], 1 ; +0xf0, 0x180039860 xor eax, eax ; +0xf5, 0x180039865 retn ; +0xf7, 0x180039867