Function at 0x1800451fc
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1180
call fcn.180082cd0
sub rsp, rax
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rsp + 0x11d0], rbx
mov rax, qword [0x1800ba080]
xor rax, rsp
mov qword [rsp + 0x1170], rax
mov r12, rdx
mov rbx, rcx
xor r13d, r13d
mov dword [rsp + 0x50], r13d
lea r15, [0x1800bf2a8]
cmp dword [0x1800bd924], r13d
je 0x180045269
mov dword [0x1800bd924], r13d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp r12, r13
jne 0x18004529a
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r13
mov byte [rbx + 8], r13b
lea r8d, [rsi - 8]
lea rdx, str.default
mov rcx, rbx
call fcn.180006440
mov rax, rbx
jmp 0x1800458c2
mov ebp, 7
mov qword [rsp + 0x110], rbp
mov qword [rsp + 0x108], r13
mov word [rsp + 0xf8], r13w
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0xf0]
call fcn.180006960
nop
lea rsi, [rsp + 0xf8]
mov rcx, qword [rsp + 0xf8]
mov rdx, qword [rsp + 0x110]
lea r14d, [rbp + 1]
cmp rdx, r14
cmovae rsi, rcx
cmp rsi, r13
je 0x180045338
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
cmp rax, rsi
ja 0x180045338
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
mov rdi, qword [rsp + 0x108]
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x180045355
call fcn.18006e940
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, r14
cmovae rax, rcx
lea rsi, [rax + rdi*2]
cmp rsi, r13
je 0x1800453b6
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
cmp rax, rsi
ja 0x1800453b6
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x1800453d3
call fcn.18006e940
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, r14
cmovae rsi, rcx
cmp rsi, r13
je 0x180045433
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
cmp rax, rsi
ja 0x180045433
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x180045438
call fcn.18006e940
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.18006e760]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x60]
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xe0]
call fcn.18000bd40
mov edx, dword [0x1800c0934]
lea rdi, [0x1800c0770]
test dl, 1
jne 0x1800454fe
or edx, 1
mov dword [0x1800c0934], edx
mov rcx, r14
call fcn.18006ea94
cmp rax, r13
je 0x1800454ad
mov qword [rax], rdi
jmp 0x1800454b0
mov rax, r13
mov qword [0x1800c0770], rax
mov rcx, rdi
call fcn.180036100
mov qword [0x1800c07a0], rax
mov byte [rax + 0x69], 1
mov rax, qword [0x1800c07a0]
mov qword [rax + 8], rax
mov rax, qword [0x1800c07a0]
mov qword [rax], rax
mov rax, qword [0x1800c07a0]
mov qword [rax + 0x10], rax
mov qword [0x1800c07a8], r13
lea rcx, [0x180091a14]
call fcn.18006e52c
nop
mov dword [rsp + 0x98], r13d
xor edx, edx
lea r8d, [rdx + 0x20]
lea rcx, [rsp + 0x9c]
call fcn.1800729a0
lea r8, [rsp + 0x98]
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp eax, r13d
jne 0x180045574
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r13
mov byte [rbx + 8], r13b
mov r8, rbp
lea rdx, str.default
mov rcx, rbx
call fcn.180006440
nop
cmp qword [rsp + 0x110], r14
jb 0x18004556c
mov rcx, qword [rsp + 0xf8]
call fcn.18006e998
mov rax, rbx
jmp 0x1800458c2
mov qword [rsp + 0x60], r15
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea r8, [rsp + 0xf0]
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.180045b64
mov r12, qword [0x1800c07a0]
mov rdi, qword [rsp + 0x40]
cmp rdi, r13
je 0x1800455b2
cmp rdi, qword [0x1800c0770]
je 0x1800455b7
call fcn.18006e940
mov rsi, qword [rsp + 0x48]
cmp rsi, r12
je 0x180045666
cmp rdi, r13
jne 0x1800455d4
call fcn.18006e940
mov r11, r13
jmp 0x1800455d7
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x30]
jne 0x1800455e2
call fcn.18006e940
mov rax, qword [rsi + 0x40]
cmp rax, qword [rsp + 0xac]
jne 0x180045666
cmp rdi, r13
jne 0x1800455ff
call fcn.18006e940
mov rdx, r13
jmp 0x180045602
mov rdx, qword [rdi]
cmp rsi, qword [rdx + 0x30]
jne 0x18004560d
call fcn.18006e940
lea rdx, [rsi + 0x48]
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r13
mov byte [rbx + 8], r13b
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.180006440
nop
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0x110], r14
jb 0x18004565e
mov rcx, qword [rsp + 0xf8]
call fcn.18006e998
mov rax, rbx
jmp 0x1800458c2
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [rsp + 0xf8]
cmp qword [rsp + 0x110], r14
cmovae rcx, qword [rsp + 0xf8]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
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, r13
je 0x18004586f
cmp rax, 0xffffffffffffffff
je 0x18004586f
mov byte [rsp + 0x170], r13b
xor edx, edx
mov r8d, 0xfff
lea rcx, [rsp + 0x171]
call fcn.1800729a0
mov qword [rsp + 0x20], r13
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.180062138
nop
mov r9d, 0xc
mov r8, r14
lea rdx, [rsp + 0x118]
mov rcx, rax
call fcn.180038d84
nop
cmp qword [rsp + 0x90], 0x10
jb 0x18004574b
mov rcx, qword [rsp + 0x78]
call fcn.18006e998
mov esi, 0xf
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0x88], r13
mov byte [rsp + 0x78], r13b
mov qword [rsp + 0x40], r15
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
xor edx, edx
lea r8d, [rsi + 0x15]
lea rcx, [rsp + 0x144]
call fcn.1800729a0
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]
lea rcx, [0x1800c0770]
call fcn.1800458f0
mov rcx, rax
lea rdx, [rsp + 0x140]
lea r8d, [rsi + 0x19]
call fcn.18006f6e0
nop
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r13
mov byte [rbx + 8], r13b
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x118]
mov rcx, rbx
call fcn.180004de0
nop
cmp qword [rsp + 0x138], 0x10
jb 0x180045831
mov rcx, qword [rsp + 0x120]
call fcn.18006e998
mov qword [rsp + 0x138], rsi
mov qword [rsp + 0x130], r13
mov byte [rsp + 0x120], r13b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x110], r14
jb 0x18004586a
mov rcx, qword [rsp + 0xf8]
call fcn.18006e998
mov rax, rbx
jmp 0x1800458c2
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r13
mov byte [rbx + 8], r13b
mov r8, rbp
lea rdx, str.default
mov rcx, rbx
call fcn.180006440
nop
cmp rdi, 0xffffffffffffffff
je 0x1800458a8
cmp rdi, r13
je 0x1800458a8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x110], r14
jb 0x1800458bf
mov rcx, qword [rsp + 0xf8]
call fcn.18006e998
mov rax, rbx
mov rcx, qword [rsp + 0x1170]
xor rcx, rsp
call fcn.18006e130
mov rbx, qword [rsp + 0x11d0]
add rsp, 0x1180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret