Function at 0x18003aad4
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.1800554d0
sub rsp, rax
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rsp + 0x11d0], rbx
mov rax, qword [0x1800764a0]
xor rax, rsp
mov qword [rsp + 0x1170], rax
mov r12, rdx
mov rbx, rcx
xor r13d, r13d
mov dword [rsp + 0x50], r13d
lea r15, [0x18007a1f8]
cmp dword [0x180078ccc], r13d
je 0x18003ab41
mov dword [0x180078ccc], r13d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp r12, r13
jne 0x18003ab72
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.180001c90
mov rax, rbx
jmp 0x18003b19a
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.18000a4d0
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 0x18003ac10
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
cmp rax, rsi
ja 0x18003ac10
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
mov rdi, qword [rsp + 0x108]
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18003ac2d
call fcn.180041018
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 0x18003ac8e
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
cmp rax, rsi
ja 0x18003ac8e
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18003acab
call fcn.180041018
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 0x18003ad0b
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
cmp rax, rsi
ja 0x18003ad0b
lea rax, [rsp + 0xf8]
cmp rdx, r14
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18003ad10
call fcn.180041018
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.180041588]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x60]
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xe0]
call fcn.18000f400
mov edx, dword [0x18007b050]
lea rdi, [0x18007ae40]
test dl, 1
jne 0x18003add6
or edx, 1
mov dword [0x18007b050], edx
mov rcx, r14
call fcn.18004116c
cmp rax, r13
je 0x18003ad85
mov qword [rax], rdi
jmp 0x18003ad88
mov rax, r13
mov qword [0x18007ae40], rax
mov rcx, rdi
call fcn.18003ca04
mov qword [0x18007ae70], rax
mov byte [rax + 0x69], 1
mov rax, qword [0x18007ae70]
mov qword [rax + 8], rax
mov rax, qword [0x18007ae70]
mov qword [rax], rax
mov rax, qword [0x18007ae70]
mov qword [rax + 0x10], rax
mov qword [0x18007ae78], r13
lea rcx, [0x18005ce9c]
call fcn.180041354
nop
mov dword [rsp + 0x98], r13d
xor edx, edx
lea r8d, [rdx + 0x20]
lea rcx, [rsp + 0x9c]
call fcn.1800432e0
lea r8, [rsp + 0x98]
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp eax, r13d
jne 0x18003ae4c
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.180001c90
nop
cmp qword [rsp + 0x110], r14
jb 0x18003ae44
mov rcx, qword [rsp + 0xf8]
call fcn.180041070
mov rax, rbx
jmp 0x18003b19a
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.18003b4f4
mov r12, qword [0x18007ae70]
mov rdi, qword [rsp + 0x40]
cmp rdi, r13
je 0x18003ae8a
cmp rdi, qword [0x18007ae40]
je 0x18003ae8f
call fcn.180041018
mov rsi, qword [rsp + 0x48]
cmp rsi, r12
je 0x18003af3e
cmp rdi, r13
jne 0x18003aeac
call fcn.180041018
mov r11, r13
jmp 0x18003aeaf
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x30]
jne 0x18003aeba
call fcn.180041018
mov rax, qword [rsi + 0x40]
cmp rax, qword [rsp + 0xac]
jne 0x18003af3e
cmp rdi, r13
jne 0x18003aed7
call fcn.180041018
mov rdx, r13
jmp 0x18003aeda
mov rdx, qword [rdi]
cmp rsi, qword [rdx + 0x30]
jne 0x18003aee5
call fcn.180041018
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.180001c90
nop
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0x110], r14
jb 0x18003af36
mov rcx, qword [rsp + 0xf8]
call fcn.180041070
mov rax, rbx
jmp 0x18003b19a
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 0x18003b147
cmp rax, 0xffffffffffffffff
je 0x18003b147
mov byte [rsp + 0x170], r13b
xor edx, edx
mov r8d, 0xfff
lea rcx, [rsp + 0x171]
call fcn.1800432e0
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.18003cfa8
nop
mov r9d, 0xc
mov r8, r14
lea rdx, [rsp + 0x118]
mov rcx, rax
call fcn.180037b4c
nop
cmp qword [rsp + 0x90], 0x10
jb 0x18003b023
mov rcx, qword [rsp + 0x78]
call fcn.180041070
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.1800432e0
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, [0x18007ae40]
call fcn.18003b280
mov rcx, rax
lea rdx, [rsp + 0x140]
lea r8d, [rsi + 0x19]
call fcn.1800415c0
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.180001a10
nop
cmp qword [rsp + 0x138], 0x10
jb 0x18003b109
mov rcx, qword [rsp + 0x120]
call fcn.180041070
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 0x18003b142
mov rcx, qword [rsp + 0xf8]
call fcn.180041070
mov rax, rbx
jmp 0x18003b19a
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.180001c90
nop
cmp rdi, 0xffffffffffffffff
je 0x18003b180
cmp rdi, r13
je 0x18003b180
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x110], r14
jb 0x18003b197
mov rcx, qword [rsp + 0xf8]
call fcn.180041070
mov rax, rbx
mov rcx, qword [rsp + 0x1170]
xor rcx, rsp
call fcn.180040bb0
mov rbx, qword [rsp + 0x11d0]
add rsp, 0x1180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret