Function at 0x180002038
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x160
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1800a1658]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov r13, rdx
mov rbx, rcx
xor r14d, r14d
mov dword [rsp + 0x50], r14d
mov eax, dword [0x1800a8328]
lea esi, [r14 + 8]
lea r12, [0x1800a82c0]
test al, 1
jne 0x1800020fe
or eax, 1
mov dword [0x1800a8328], eax
mov rcx, rsi
call fcn.1800592c8
cmp rax, r14
je 0x1800020ad
mov qword [rax], r12
jmp 0x1800020b0
mov rax, r14
mov qword [0x1800a82c0], rax
mov rcx, r12
call fcn.18000b4c4
mov qword [0x1800a82f0], rax
mov byte [rax + 0x71], 1
mov rax, qword [0x1800a82f0]
mov qword [rax + 8], rax
mov rax, qword [0x1800a82f0]
mov qword [rax], rax
mov rax, qword [0x1800a82f0]
mov qword [rax + 0x10], rax
mov qword [0x1800a82f8], r14
lea rcx, [0x1800787d4]
call fcn.18005a38c
nop
lea rbp, [0x1800a8300]
cmp byte [0x1800a3a0c], r14b
je 0x18000211e
mov byte [0x1800a3a0c], r14b
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [rsp + 0x70], r14d
xor edx, edx
lea r8d, [rdx + 0x20]
lea rcx, [rsp + 0x74]
call fcn.18005a150
lea r8, [rsp + 0x70]
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp dword [rsp + 0x70], 0xffffffff
je 0x18000268d
test byte [rsp + 0x70], 0x10
jne 0x18000268d
cmp dword [rsp + 0x8c], r14d
ja 0x180002665
cmp dword [rsp + 0x90], 0xa00000
ja 0x180002665
mov qword [rsp + 0xe8], 7
mov qword [rsp + 0xe0], r14
mov word [rsp + 0xd0], r14w
xor eax, eax
or r15, 0xffffffffffffffff
mov rcx, r15
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0xc8]
call fcn.180007618
nop
lea rdx, [rsp + 0xd0]
cmp qword [rsp + 0xe8], rsi
cmovae rdx, qword [rsp + 0xd0]
lea r8, [rsp + 0xc8]
lea rcx, [rsp + 0x40]
call fcn.180008f4c
movaps xmm5, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x60], xmm5
lea rcx, [rsp + 0xd0]
cmp qword [rsp + 0xe8], rsi
cmovae rcx, qword [rsp + 0xd0]
mov rax, qword [rsp + 0xe0]
lea rdx, [rcx + rax*2]
lea r8, [rsp + 0xc8]
lea rcx, [rsp + 0x40]
call fcn.180008f4c
movaps xmm5, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0xa0], xmm5
lea rdx, [rsp + 0xd0]
cmp qword [rsp + 0xe8], rsi
cmovae rdx, qword [rsp + 0xd0]
lea r8, [rsp + 0xc8]
lea rcx, [rsp + 0x40]
call fcn.180008f4c
movaps xmm5, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm5
lea rax, [fcn.18005a110]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x60]
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xb8]
call fcn.18000cad8
mov qword [rsp + 0xa0], rbp
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea r8, [rsp + 0xc8]
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.18000831c
mov rdi, qword [0x1800a82f0]
mov rax, qword [rsp + 0x60]
cmp rax, r14
je 0x1800022d9
cmp rax, qword [0x1800a82c0]
je 0x1800022de
call fcn.1800592a8
mov rax, qword [rsp + 0x68]
cmp rax, rdi
je 0x180002324
mov rcx, qword [rax + 0x30]
cmp qword [rax + 0x38], rsi
jb 0x1800022f8
mov r9, qword [rax + 0x20]
jmp 0x1800022fc
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rcx
mov r8, qword [rsp + 0xe0]
xor edx, edx
lea rcx, [rsp + 0xc8]
call fcn.18000d6fc
cmp eax, r14d
jl 0x180002324
lea rax, [rsp + 0x60]
jmp 0x180002341
mov rax, qword [0x1800a82f0]
mov qword [rsp + 0x48], rax
mov rax, qword [0x1800a82c0]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x40]
movdqu xmm0, xmmword [rax]
movdqu xmmword [rsp + 0x40], xmm0
mov r12, qword [0x1800a82f0]
mov rdi, qword [rsp + 0x40]
cmp rdi, r14
je 0x180002365
cmp rdi, qword [0x1800a82c0]
je 0x18000236a
call fcn.1800592a8
mov esi, 0xf
mov rbp, qword [rsp + 0x48]
cmp rbp, r12
je 0x180002485
cmp rdi, r14
jne 0x18000238c
call fcn.1800592a8
mov rdx, r14
jmp 0x18000238f
mov rdx, qword [rdi]
cmp rbp, qword [rdx + 0x30]
jne 0x18000239a
call fcn.1800592a8
mov rax, qword [rbp + 0x40]
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0x118], rsi
mov qword [rsp + 0x110], r14
mov byte [rsp + 0x100], r14b
lea rdx, [rbp + 0x48]
mov r9, r15
xor r8d, r8d
lea rcx, [rsp + 0xf8]
call fcn.180007178
nop
mov rax, qword [rsp + 0xf0]
cmp rax, qword [rsp + 0x84]
jne 0x18000246d
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
mov r9, r15
xor r8d, r8d
lea rdx, [rsp + 0xf8]
mov rcx, rbx
call fcn.180007178
nop
cmp qword [rsp + 0x118], 0x10
jb 0x180002427
mov rcx, qword [rsp + 0x100]
call fcn.180058ed8
mov qword [rsp + 0x118], rsi
mov qword [rsp + 0x110], r14
mov byte [rsp + 0x100], r14b
lea rcx, [0x1800a8300]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0xe8], 8
jb 0x180002465
mov rcx, qword [rsp + 0xd0]
call fcn.180058ed8
mov rax, rbx
jmp 0x1800026b3
cmp qword [rsp + 0x118], 0x10
jb 0x180002485
mov rcx, qword [rsp + 0x100]
call fcn.180058ed8
mov qword [rsp + 0x148], rsi
mov qword [rsp + 0x140], r14
mov byte [rsp + 0x130], r14b
mov rax, qword [rsp + 0x84]
mov qword [rsp + 0x120], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 7]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x60], rax
cmp rax, r14
je 0x1800025d3
cmp rax, r15
je 0x1800025d3
mov ecx, dword [rsp + 0x90]
call fcn.18005a4f0
mov rbp, rax
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0x90]
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r14d
je 0x1800025cb
mov eax, dword [rsp + 0x90]
cmp dword [rsp + 0x50], eax
jne 0x1800025cb
mov r8, rax
mov qword [rsp + 0x110], rsi
mov qword [rsp + 0x108], r14
mov byte [rsp + 0xf8], r14b
mov rdx, rbp
lea rcx, [rsp + 0xf0]
call fcn.180007288
nop
mov r9, r15
xor r8d, r8d
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x128]
call fcn.180007178
nop
cmp qword [rsp + 0x110], 0x10
jb 0x180002595
mov rcx, qword [rsp + 0xf8]
call fcn.180058ed8
lea rdx, [rsp + 0xc8]
lea rcx, [0x1800a82c0]
call fcn.18000687c
mov rcx, qword [rsp + 0x120]
mov qword [rax], rcx
lea rcx, [rax + 8]
mov r9, r15
xor r8d, r8d
lea rdx, [rsp + 0x128]
call fcn.180007178
mov rcx, rbp
call fcn.18005a5a8
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
mov r9, r15
xor r8d, r8d
lea rdx, [rsp + 0x128]
mov rcx, rbx
call fcn.180007178
nop
cmp rdi, r15
je 0x18000260a
cmp rdi, r14
je 0x18000260a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x148], 0x10
jb 0x180002622
mov rcx, qword [rsp + 0x130]
call fcn.180058ed8
mov qword [rsp + 0x148], rsi
mov qword [rsp + 0x140], r14
mov byte [rsp + 0x130], r14b
lea rcx, [0x1800a8300]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0xe8], 8
jb 0x180002660
mov rcx, qword [rsp + 0xd0]
call fcn.180058ed8
mov rax, rbx
jmp 0x1800026b3
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
xor r8d, r8d
lea rdx, [0x1800827d9]
mov rcx, rbx
call fcn.180007288
mov rax, rbx
jmp 0x1800026b3
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
xor r8d, r8d
lea rdx, [0x1800827d9]
mov rcx, rbx
call fcn.180007288
mov rax, rbx
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.180059b00
mov rbx, qword [rsp + 0x1b0]
add rsp, 0x160
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret