Function at 0x180047264
Capabilities:
Read file on windows

Disassembly:
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1180
call fcn.18006c990
sub rsp, rax
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rsp + 0x11b8], rbx
mov qword [rsp + 0x11c0], rbp
mov qword [rsp + 0x11c8], rsi
mov rax, qword [0x180097090]
xor rax, rsp
mov qword [rsp + 0x1170], rax
mov rbx, rcx
xor r12d, r12d
mov dword [rsp + 0x50], r12d
lea r14, [0x18009c5d0]
cmp dword [0x18009a9b8], r12d
je 0x1800472dc
mov dword [0x18009a9b8], r12d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov qword [rsp + 0x110], 7
mov qword [rsp + 0x108], r12
mov word [rsp + 0xf8], r12w
xor eax, eax
or rcx, 0xffffffffffffffff
lea rbp, [0x18009c860]
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbp
lea rcx, [rsp + 0xf0]
call fcn.18000d5e0
nop
lea rsi, [rsp + 0xf8]
mov rcx, qword [rsp + 0xf8]
mov rdx, qword [rsp + 0x110]
mov r13d, 8
cmp rdx, r13
cmovae rsi, rcx
cmp rsi, r12
je 0x180047382
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
cmp rax, rsi
ja 0x180047382
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
mov rdi, qword [rsp + 0x108]
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18004739f
call fcn.180053884
mov rdx, qword [rsp + 0x110]
mov rdi, qword [rsp + 0x108]
mov rcx, qword [rsp + 0xf8]
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x60], xmm0
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
lea rsi, [rax + rdi*2]
cmp rsi, r12
je 0x180047400
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
cmp rax, rsi
ja 0x180047400
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18004741d
call fcn.180053884
mov rdx, qword [rsp + 0x110]
mov rdi, qword [rsp + 0x108]
mov rcx, qword [rsp + 0xf8]
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0xd0], xmm0
lea rsi, [rsp + 0xf8]
cmp rdx, r13
cmovae rsi, rcx
cmp rsi, r12
je 0x18004747d
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
cmp rax, rsi
ja 0x18004747d
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x180047482
call fcn.180053884
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rax, [fcn.1800536a4]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x60]
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xe0]
call fcn.180013b50
mov edx, dword [0x18009df7c]
lea r15, [0x18009de70]
test dl, 1
jne 0x180047548
or edx, 1
mov dword [0x18009df7c], edx
mov rcx, r13
call fcn.1800539d8
cmp rax, r12
je 0x1800474f7
mov qword [rax], r15
jmp 0x1800474fa
mov rax, r12
mov qword [0x18009de70], rax
mov rcx, r15
call fcn.1800490c0
mov qword [0x18009dea0], rax
mov byte [rax + 0x69], 1
mov rax, qword [0x18009dea0]
mov qword [rax + 8], rax
mov rax, qword [0x18009dea0]
mov qword [rax], rax
mov rax, qword [0x18009dea0]
mov qword [rax + 0x10], rax
mov qword [0x18009dea8], r12
lea rcx, [0x1800767ac]
call fcn.180053470
nop
mov dword [rsp + 0x98], r12d
xor edx, edx
lea r8d, [rdx + 0x20]
lea rcx, [rsp + 0x9c]
call fcn.1800575a0
lea r8, [rsp + 0x98]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp eax, r12d
jne 0x1800475bf
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
lea r8d, [rsi - 8]
lea rdx, str.default
mov rcx, rbx
call fcn.18000d0c0
nop
cmp qword [rsp + 0x110], r13
jb 0x1800475b7
mov rcx, qword [rsp + 0xf8]
call fcn.1800538dc
mov rax, rbx
jmp 0x18004790a
mov qword [rsp + 0x60], r14
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea r8, [rsp + 0xf0]
lea rdx, [rsp + 0x40]
mov rcx, r15
call fcn.180047bb0
mov rbp, qword [0x18009dea0]
mov rdi, qword [rsp + 0x40]
cmp rdi, r12
je 0x1800475fd
cmp rdi, qword [0x18009de70]
je 0x180047602
call fcn.180053884
mov rsi, qword [rsp + 0x48]
cmp rsi, rbp
je 0x1800476b1
cmp rdi, r12
jne 0x18004761f
call fcn.180053884
mov r11, r12
jmp 0x180047622
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x30]
jne 0x18004762d
call fcn.180053884
mov rax, qword [rsi + 0x40]
cmp rax, qword [rsp + 0xac]
jne 0x1800476b1
cmp rdi, r12
jne 0x18004764a
call fcn.180053884
mov rdx, r12
jmp 0x18004764d
mov rdx, qword [rdi]
cmp rsi, qword [rdx + 0x30]
jne 0x180047658
call fcn.180053884
lea rdx, [rsi + 0x48]
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, rbx
call fcn.18000d0c0
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0x110], r13
jb 0x1800476a9
mov rcx, qword [rsp + 0xf8]
call fcn.1800538dc
mov rax, rbx
jmp 0x18004790a
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [rsp + 0xf8]
cmp qword [rsp + 0x110], r13
cmovae rcx, qword [rsp + 0xf8]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov r8d, 3
mov dword [rsp + 0x20], r8d
xor r9d, r9d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x60], rax
cmp rax, r12
je 0x1800478b6
cmp rax, 0xffffffffffffffff
je 0x1800478b6
mov byte [rsp + 0x170], r12b
xor edx, edx
mov r8d, 0xfff
lea rcx, [rsp + 0x171]
call fcn.1800575a0
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
mov esi, 0x1000
mov r8d, esi
lea rdx, [rsp + 0x170]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r8d, esi
lea rdx, [rsp + 0x170]
lea rcx, [rsp + 0x70]
call fcn.18004c220
nop
mov r9d, 0xc
mov r8, r13
lea rdx, [rsp + 0x118]
mov rcx, rax
call fcn.180046e58
nop
cmp qword [rsp + 0x90], 0x10
jb 0x180047796
mov rcx, qword [rsp + 0x78]
call fcn.1800538dc
mov esi, 0xf
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0x88], r12
mov byte [rsp + 0x78], r12b
mov qword [rsp + 0x40], r14
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
xor edx, edx
lea r8d, [rsi + 0x15]
lea rcx, [rsp + 0x144]
call fcn.1800575a0
mov r11, qword [rsp + 0xac]
mov qword [rsp + 0x140], r11
lea rdx, [rsp + 0x120]
cmp qword [rsp + 0x138], 0x10
cmovae rdx, qword [rsp + 0x120]
lea r8d, [rsi + 0x11]
lea rcx, [rsp + 0x148]
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
lea rdx, [rsp + 0xf0]
mov rcx, r15
call fcn.18004793c
mov rcx, rax
lea rdx, [rsp + 0x140]
lea r8d, [rsi + 0x19]
call fcn.180052ff0
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x118]
mov rcx, rbx
call fcn.18000ba90
nop
cmp qword [rsp + 0x138], 0x10
jb 0x180047878
mov rcx, qword [rsp + 0x120]
call fcn.1800538dc
mov qword [rsp + 0x138], rsi
mov qword [rsp + 0x130], r12
mov byte [rsp + 0x120], r12b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x110], r13
jb 0x1800478b1
mov rcx, qword [rsp + 0xf8]
call fcn.1800538dc
mov rax, rbx
jmp 0x18004790a
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
lea r8d, [rsi - 8]
lea rdx, str.default
mov rcx, rbx
call fcn.18000d0c0
nop
cmp rdi, 0xffffffffffffffff
je 0x1800478f0
cmp rdi, r12
je 0x1800478f0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x110], r13
jb 0x180047907
mov rcx, qword [rsp + 0xf8]
call fcn.1800538dc
mov rax, rbx
mov rcx, qword [rsp + 0x1170]
xor rcx, rsp
call fcn.180052d60
lea r11, [rsp + 0x1180]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret