; ; convert_to_stat_mode from 0x180129504 to 0x18012963f (315 bytes) ; ; 3 xrefs: ; > common_stat<_stat64i32> @ 0x1801291ad ; > common_stat_handle_file_opened<_stat64i32> @ 0x1801292bd ; > @ 0x180202a98 ; ; 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, 0x180129504 mov [rsp+arg_8], rbp ; +0x5, 0x180129509 mov [rsp+arg_10], rsi ; +0xa, 0x18012950e push rdi ; +0xf, 0x180129513 sub rsp, 20h ; +0x10, 0x180129514 mov eax, ecx ; +0x14, 0x180129518 xor ebp, ebp ; +0x16, 0x18012951a shr eax, 4 ; +0x18, 0x18012951c mov dil, 1 ; +0x1b, 0x18012951f mov r8, rdx ; +0x1e, 0x180129522 mov ebx, ecx ; +0x21, 0x180129525 test dil, al ; +0x23, 0x180129527 jnz short loc_180129582 ; +0x26, 0x18012952a test rdx, rdx ; +0x28, 0x18012952c jz short loc_18012957B ; +0x2b, 0x18012952f movzx eax, word ptr [rdx] ; +0x2d, 0x180129531 sub ax, 41h ; 'A' ; +0x30, 0x180129534 cmp ax, 19h ; +0x34, 0x180129538 jbe short loc_18012954A ; +0x38, 0x18012953c cmp word ptr [rdx], 61h ; 'a' ; +0x3a, 0x18012953e jb short loc_180129554 ; +0x3e, 0x180129542 cmp word ptr [rdx], 7Ah ; 'z' ; +0x40, 0x180129544 ja short loc_180129554 ; +0x44, 0x180129548 cmp word ptr [rdx+2], 3Ah ; ':' ; +0x46, 0x18012954a mov dl, dil ; +0x4b, 0x18012954f jz short loc_180129557 ; +0x4e, 0x180129552 mov dl, bpl ; +0x50, 0x180129554 test dl, dl ; +0x53, 0x180129557 lea rax, [r8+4] ; +0x55, 0x180129559 mov rcx, r8 ; +0x59, 0x18012955d cmovnz rcx, rax ; +0x5c, 0x180129560 cmp [rcx], bp ; +0x60, 0x180129564 jz short loc_180129582 ; +0x63, 0x180129567 cmp word ptr [rcx], 5Ch ; '\' ; +0x65, 0x180129569 jz short loc_180129575 ; +0x69, 0x18012956d cmp word ptr [rcx], 2Fh ; '/' ; +0x6b, 0x18012956f jnz short loc_18012957B ; +0x6f, 0x180129573 cmp [rcx+2], bp ; +0x71, 0x180129575 jz short loc_180129582 ; +0x75, 0x180129579 mov eax, 8100h ; +0x77, 0x18012957b jmp short loc_180129587 ; +0x7c, 0x180129580 mov eax, 4140h ; +0x7e, 0x180129582 shl bx, 7 ; +0x83, 0x180129587 mov ecx, 80h ; +0x87, 0x18012958b not bx ; +0x8c, 0x180129590 and bx, cx ; +0x8f, 0x180129593 or bx, ax ; +0x92, 0x180129596 test r8, r8 ; +0x95, 0x180129599 jz short loc_1801295FD ; +0x98, 0x18012959c lea edx, [rcx-52h]; Ch ; +0x9a, 0x18012959e mov rcx, r8; Str ; +0x9d, 0x1801295a1 call wcsrchr ; +0xa0, 0x1801295a4 mov rsi, rax ; +0xa5, 0x1801295a9 test rax, rax ; +0xa8, 0x1801295ac jz short loc_1801295FD ; +0xab, 0x1801295af lea rdx, aExe ; +0xad, 0x1801295b1 mov rcx, rax; String1 ; +0xb4, 0x1801295b8 call _wcsicmp ; +0xb7, 0x1801295bb test eax, eax ; +0xbc, 0x1801295c0 jz short loc_180129600 ; +0xbe, 0x1801295c2 lea rdx, aCmd ; +0xc0, 0x1801295c4 mov rcx, rsi; String1 ; +0xc7, 0x1801295cb call _wcsicmp ; +0xca, 0x1801295ce test eax, eax ; +0xcf, 0x1801295d3 jz short loc_180129600 ; +0xd1, 0x1801295d5 lea rdx, aBat ; +0xd3, 0x1801295d7 mov rcx, rsi; String1 ; +0xda, 0x1801295de call _wcsicmp ; +0xdd, 0x1801295e1 test eax, eax ; +0xe2, 0x1801295e6 jz short loc_180129600 ; +0xe4, 0x1801295e8 lea rdx, aCom ; +0xe6, 0x1801295ea mov rcx, rsi; String1 ; +0xed, 0x1801295f1 call _wcsicmp ; +0xf0, 0x1801295f4 test eax, eax ; +0xf5, 0x1801295f9 jz short loc_180129600 ; +0xf7, 0x1801295fb mov dil, bpl ; +0xf9, 0x1801295fd mov rbp, [rsp+28h+arg_8] ; +0xfc, 0x180129600 movzx eax, bx ; +0x101, 0x180129605 mov rsi, [rsp+28h+arg_10] ; +0x104, 0x180129608 or ax, 40h ; +0x109, 0x18012960d test dil, dil ; +0x10d, 0x180129611 cmovz ax, bx ; +0x110, 0x180129614 mov rbx, [rsp+28h+arg_0] ; +0x114, 0x180129618 movzx ecx, ax ; +0x119, 0x18012961d shr cx, 3 ; +0x11c, 0x180129620 and cx, 38h ; +0x120, 0x180129624 or cx, ax ; +0x124, 0x180129628 movzx eax, cx ; +0x127, 0x18012962b shr ax, 6 ; +0x12a, 0x18012962e and ax, 7 ; +0x12e, 0x180129632 or ax, cx ; +0x132, 0x180129636 add rsp, 20h ; +0x135, 0x180129639 pop rdi ; +0x139, 0x18012963d retn ; +0x13a, 0x18012963e