Function at 0x140039020
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rbp + 0x1f], rax
xor esi, esi
mov qword [rbp - 0x19], rdx
mov rbx, r9
mov r12, rdx
mov qword [rbp - 0x21], rbx
mov r15, rcx
bt r8d, 9
jae 0x140039398
mov edi, esi
mov qword [rbp + 0xf], rsi
lea r14d, [rsi + 0x10]
mov qword [rbp + 0x17], rbx
mov dword [rbp - 0x39], esi
test rdi, rdi
je 0x14003909e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8d, r14d
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
je 0x140039398
mov qword [rsp + 0x38], rsi
lea rax, [rbp - 0x39]
mov qword [rsp + 0x30], rax
lea r8, [rbp + 0xf]
mov dword [rsp + 0x28], r14d
mov r9d, FDICreate
mov edx, 0x940cf
mov qword [rsp + 0x20], rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
nop dword [rax + rax]
test eax, eax
jne 0x14003912a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0xea
jne 0x140039122
add r14d, r14d
jmp 0x140039079
test eax, eax
jne 0x140039378
mov rax, rsi
test r15, r15
je 0x140039141
mov rax, qword [r15 + 0x48]
test rax, rax
cmovne r15, rax
mov rax, qword [r15 + 0x28]
mov edx, dword [rbp - 0x39]
test edx, edx
jne 0x140039150
mov qword [rbp - 0x31], rsi
xor ecx, ecx
jmp 0x1400391c9
cmp edx, 0x10
jbe 0x1400391de
mov rcx, qword [rdi]
test rcx, rcx
jle 0x14003917d
mov qword [rbp - 0x29], rcx
lea rdx, [rbp - 0x31]
xor ecx, ecx
mov qword [rbp - 0x31], rsi
call fcn.140038fb8
mov rcx, qword [rdi]
mov rsi, rax
mov edx, dword [rbp - 0x39]
add rcx, qword [rdi + 8]
lea r14, [rdi + 0x10]
mov eax, r14d
sub eax, edi
cmp eax, edx
jmp 0x1400391b7
mov rax, qword [r14]
lea rdx, [rbp - 0x31]
mov rcx, rsi
mov qword [rbp - 0x29], rax
call fcn.140038fb8
mov rcx, qword [r14 + 8]
mov rsi, rax
add rcx, qword [r14]
add r14, 0x10
mov eax, r14d
sub eax, edi
cmp eax, dword [rbp - 0x39]
mov qword [rbp - 0x31], rcx
jb 0x14003918e
cmp rcx, rbx
jge 0x140039378
mov rcx, rsi
lea rdx, [rbp - 0x31]
mov qword [rbp - 0x29], rbx
call fcn.140038fb8
mov rsi, rax
jmp 0x140039378
cmp dword [rbp - 0x1d], esi
jne 0x140039378
test rax, rax
je 0x140039378
mov r14d, dword [rax + 4]
mov ecx, 0x10000
cmp r14d, ecx
mov eax, r14d
cmovb eax, ecx
cmp eax, ebx
jb 0x140039378
cmp r14d, ecx
mov r13d, esi
cmovb r14d, ecx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8d, r14d
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov r15, rax
test rax, rax
je 0x140039378
mov rdx, qword [0x1400bac90]
lea r8, [rbp - 0x31]
mov r9d, 1
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
nop dword [rax + rax]
test eax, eax
je 0x140039358
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8d, r14d
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov r12, rax
test rax, rax
je 0x140039358
mov rdx, qword [0x1400bac90]
xorps xmm0, xmm0
mov rcx, qword [rbp - 0x19]
xor r9d, r9d
xor r8d, r8d
mov dword [rbp - 0x21], esi
movups xmmword [rbp - 0x11], xmm0
movups xmmword [rbp - 1], xmm0
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
nop dword [rax + rax]
mov r8d, r14d
lea rax, [rbp - 0x11]
mov r14, qword [rbp - 0x19]
lea r9, [rbp - 0x21]
mov rcx, r14
mov qword [rsp + 0x20], rax
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
je 0x140039304
mov r8d, dword [rbp - 0x21]
mov rdx, r12
mov rcx, r15
call sub.msvcrt.dll_memcmp
test eax, eax
sete r13b
mov rdx, qword [rbp - 0x31]
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
test r13d, r13d
je 0x140039358
lea rdx, [rbp - 0x31]
mov qword [rbp - 0x31], rsi
xor ecx, ecx
mov qword [rbp - 0x29], rbx
call fcn.140038fb8
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov rax, rsi
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.140096bd0
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret