Function at 0x140031820
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x480
lea rdi, [rsp + 0x20]
mov ecx, 0x118
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x490]
mov rax, qword [0x140177c80]
xor rax, rsp
mov qword [rsp + 0x478], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x438], rax
mov dword [rsp + 0x440], 0
mov dword [rsp + 0x448], 0
mov qword [rsp + 0x458], 0
cmp qword [rsp + 0x490], 0
je 0x1400318aa
cmp dword [rsp + 0x498], 2
je 0x1400318b1
cmp dword [rsp + 0x498], 1
je 0x1400318b1
xor eax, eax
jmp 0x140031abf
lea rdx, [0x140172a00]
mov rcx, qword [rsp + 0x490]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rsp + 0x450], rax
cmp qword [rsp + 0x450], 0
jne 0x1400318e0
xor eax, eax
jmp 0x140031abf
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
je 0x14003190f
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
jmp 0x140031abf
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov dword [rsp + 0x448], eax
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
je 0x140031950
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
jmp 0x140031abf
cmp dword [rsp + 0x448], 0x400000
jg 0x140031967
cmp dword [rsp + 0x448], 0
jge 0x140031982
xor eax, eax
test eax, eax
jne 0x140031967
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
jmp 0x140031abf
cmp dword [rsp + 0x448], 0x400
jle 0x1400319d2
movsxd rax, dword [rsp + 0x448]
mov rcx, rax
call fcn.14007a300
mov qword [rsp + 0x438], rax
cmp qword [rsp + 0x438], 0
jne 0x1400319c7
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
jmp 0x140031abf
mov dword [rsp + 0x440], 1
movsxd rax, dword [rsp + 0x448]
mov r9, qword [rsp + 0x450]
mov r8, rax
mov edx, 1
mov rcx, qword [rsp + 0x438]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov dword [rsp + 0x444], eax
mov eax, dword [rsp + 0x448]
cmp dword [rsp + 0x444], eax
je 0x140031a53
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp dword [rsp + 0x440], 0
je 0x140031a4f
mov rax, qword [rsp + 0x438]
mov qword [rsp + 0x460], rax
cmp qword [rsp + 0x460], 0
je 0x140031a4f
mov rcx, qword [rsp + 0x460]
call fcn.14007a350
xor eax, eax
jmp 0x140031abf
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov r8d, dword [rsp + 0x498]
mov edx, dword [rsp + 0x448]
mov rcx, qword [rsp + 0x438]
call fcn.140031b00
mov qword [rsp + 0x458], rax
cmp dword [rsp + 0x440], 0
je 0x140031ab7
mov rax, qword [rsp + 0x438]
mov qword [rsp + 0x468], rax
cmp qword [rsp + 0x468], 0
je 0x140031ab7
mov rcx, qword [rsp + 0x468]
call fcn.14007a350
mov rax, qword [rsp + 0x458]
mov rdi, rax
mov rcx, rsp
lea rdx, [0x14013bf40]
call fcn.140132900
mov rax, rdi
mov rcx, qword [rsp + 0x478]
xor rcx, rsp
call fcn.140132640
add rsp, 0x480
pop rdi
ret