Function at 0x140003840
Capabilities:
Get file size
Read file on windows

Disassembly:
sub rsp, 0xb8
mov dword [rsp + 0x98], 0
mov ecx, 0x1f4
call qword [0x1400222c0]
mov eax, dword [0x140021004]
mov dword [rsp + 0x90], eax
mov dword [rsp + 0x94], 0
mov dword [rsp + 0x20], 8
lea r9, [rsp + 0x90]
mov r8d, 0x1006
mov edx, 0xffff
mov rcx, qword [0x140021098]
call qword [0x140022278]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0x400
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x40], 0
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsp + 0xa0], rax
mov dword [rsp + 0x44], 0
jmp 0x1400038eb
mov eax, dword [rsp + 0x44]
inc eax
mov dword [rsp + 0x44], eax
mov edx, 0x400
mov rcx, qword [rsp + 0x30]
call fcn.1400037f0
xor edx, edx
mov rcx, qword [0x1400221d0]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x9c], eax
mov dword [rsp + 0x38], 0
mov ecx, 0x50
call qword [0x1400222c0]
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x1400221d0]
call qword [0x140022200]
cmp dword [rsp + 0x38], 0
jbe 0x140003a4a
mov dword [rsp + 0x78], 1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 4
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x78]
mov dword [rax], ecx
xor r9d, r9d
mov r8d, 4
mov rdx, qword [rsp + 0x50]
mov rcx, qword [0x140021098]
call fcn.1400034c0
cmp eax, 0xffffffff
jne 0x1400039c2
mov rcx, qword [rsp + 0x50]
call fcn.140004a60
mov rcx, qword [rsp + 0x30]
call fcn.140004a60
xor eax, eax
jmp 0x140003cfb
mov edx, 0x400
mov rcx, qword [rsp + 0x30]
call fcn.1400037f0
cmp dword [rsp + 0x38], 0x400
jae 0x140003a06
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0x30]
mov rcx, qword [0x1400221d0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rsp + 0x40], eax
jmp 0x140003a30
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, 0x400
mov rdx, qword [rsp + 0x30]
mov rcx, qword [0x1400221d0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x140003a3e
xor eax, eax
jmp 0x140003cfb
mov rcx, qword [rsp + 0x50]
call fcn.140004a60
jmp 0x140003ac5
mov dword [rsp + 0x7c], 0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 4
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x7c]
mov dword [rax], ecx
xor r9d, r9d
mov r8d, 4
mov rdx, qword [rsp + 0x58]
mov rcx, qword [0x140021098]
call fcn.1400034c0
cmp eax, 0xffffffff
jne 0x140003ab6
mov rcx, qword [rsp + 0x58]
call fcn.140004a60
mov rcx, qword [rsp + 0x30]
call fcn.140004a60
xor eax, eax
jmp 0x140003cfb
mov rcx, qword [rsp + 0x58]
call fcn.140004a60
jmp 0x140003cec
mov eax, dword [rsp + 0x48]
mov qword [rsp + 0x80], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 8
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x80]
add rax, 0x3ff
xor edx, edx
mov ecx, 0x400
div rcx
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x88]
mov qword [rax], rcx
xor r9d, r9d
mov r8d, 8
mov rdx, qword [rsp + 0x60]
mov rcx, qword [0x140021098]
call fcn.1400034c0
cmp eax, 0xffffffff
jne 0x140003b50
mov rcx, qword [rsp + 0x60]
call fcn.140004a60
xor eax, eax
jmp 0x140003cfb
mov rcx, qword [rsp + 0x60]
call fcn.140004a60
mov qword [rsp + 0x70], 0
xor edx, edx
mov rax, qword [rsp + 0x80]
mov ecx, 0x400
div rcx
mov rax, rdx
test rax, rax
jne 0x140003b88
mov qword [rsp + 0x70], 0x400
jmp 0x140003ba2
xor edx, edx
mov rax, qword [rsp + 0x80]
mov ecx, 0x400
div rcx
mov rax, rdx
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 8
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x70]
mov qword [rax], rcx
xor r9d, r9d
mov r8d, 8
mov rdx, qword [rsp + 0x68]
mov rcx, qword [0x140021098]
call fcn.1400034c0
cmp eax, 0xffffffff
jne 0x140003c08
mov rcx, qword [rsp + 0x30]
call fcn.140004a60
mov rcx, qword [rsp + 0x68]
call fcn.140004a60
xor eax, eax
jmp 0x140003cfb
mov rcx, qword [rsp + 0x68]
call fcn.140004a60
mov dword [rsp + 0x3c], 0
jmp 0x140003c26
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
movsxd rax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x88]
dec rcx
cmp rax, rcx
jae 0x140003c87
imul eax, dword [rsp + 0x3c], 0x400
cdqe
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
xor r9d, r9d
mov r8d, 0x400
mov rdx, rax
mov rcx, qword [0x140021098]
call fcn.1400034c0
mov dword [0x140021bbc], eax
cmp dword [0x140021bbc], 0xffffffff
jne 0x140003c85
mov rcx, qword [rsp + 0x30]
call fcn.140004a60
xor eax, eax
jmp 0x140003cfb
jmp 0x140003c1c
mov rax, qword [rsp + 0x88]
dec rax
imul rax, rax, 0x400
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
xor r9d, r9d
mov r8d, dword [rsp + 0x70]
mov rdx, rax
mov rcx, qword [0x140021098]
call fcn.1400034c0
mov dword [0x140021bbc], eax
cmp dword [0x140021bbc], 0xffffffff
jne 0x140003cd8
mov rcx, qword [rsp + 0x30]
call fcn.140004a60
xor eax, eax
jmp 0x140003cfb
mov edx, 0x400
mov rcx, qword [rsp + 0x30]
call fcn.1400037f0
jmp 0x1400038e1
mov rcx, qword [rsp + 0x30]
call fcn.140004a60
mov eax, 1
add rsp, 0xb8
ret