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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xe8
mov qword [rbp - 0x19], 0xfffffffffffffffe
mov rax, qword [0x180067008]
xor rax, rsp
mov qword [rbp + 7], rax
mov r12, r9
mov rdi, r8
mov r14, rdx
mov rbx, rcx
mov r15, qword [rbp + 0x7f]
xor r13d, r13d
mov qword [rbp - 9], r13
mov qword [rbp - 1], r13
call fcn.18000f420
mov qword [rbp - 9], rax
mov r8, rbx
lea rcx, [rsp + 0x40]
call fcn.180032070
nop
mov rdx, rax
lea rcx, [rbp - 9]
call fcn.1800320c0
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 9]
call fcn.18000c550
nop
lea rcx, [rsp + 0x48]
call fcn.180001e50
lea rcx, [rbp - 9]
call fcn.18001df70
mov ebx, eax
test eax, eax
jne 0x180031bc1
mov rcx, qword [r15]
mov rax, qword [r15 + 8]
cmp rcx, rax
je 0x180031a40
sub rax, rcx
mov dword [rbp - 0x29], eax
mov qword [rbp - 0x51], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x59], r13
mov byte [rbp - 0x69], bl
lea r8d, [r13 + 1]
lea rdx, [0x180059f18]
lea rcx, [rbp - 0x69]
call fcn.1800020b0
nop
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.180031670
mov rsi, rax
mov rdx, r12
lea rcx, [rbp - 0x49]
call fcn.180031670
mov rdi, rax
mov rbx, qword [r15]
lea rcx, [rbp - 0x69]
call fcn.1800205b0
lea rcx, [rbp - 0x29]
mov qword [rsp + 0x20], rcx
mov r9, rbx
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call fcn.180023770
mov ebx, eax
mov rax, qword [rbp - 0x31]
cmp rax, 0x10
jb 0x180031968
inc rax
mov rcx, qword [rbp - 0x49]
cmp rax, 0x1000
jb 0x180031963
test cl, 0x1f
je 0x180031936
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180031945
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x180031954
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x180031960
call fcn.18003835c
int3
mov rcx, rax
call fcn.180033ed0
mov qword [rbp - 0x31], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x39], r13
mov byte [rbp - 0x49], 0
mov rax, qword [rbp - 0x79]
cmp rax, 0x10
jb 0x1800319cf
inc rax
mov rcx, qword [rsp + 0x40]
cmp rax, 0x1000
jb 0x1800319ca
test cl, 0x1f
je 0x18003199d
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x1800319ac
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x1800319bb
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x1800319c7
call fcn.18003835c
int3
mov rcx, rax
call fcn.180033ed0
mov qword [rbp - 0x79], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x50], r13
mov byte [rsp + 0x40], 0
mov rax, qword [rbp - 0x51]
cmp rax, 0x10
jb 0x180031bc1
inc rax
mov rcx, qword [rbp - 0x69]
cmp rax, 0x1000
jb 0x180031a36
test cl, 0x1f
je 0x180031a09
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180031a18
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x180031a27
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x180031a33
call fcn.18003835c
int3
mov rcx, rax
call fcn.180033ed0
jmp 0x180031bc1
cmp qword [r14 + 0x18], 8
jb 0x180031a4c
mov rcx, qword [r14]
jmp 0x180031a4f
mov rcx, r14
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180031a89
mov ebx, 0xfffffffe
jmp 0x180031bc1
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp - 0x11], eax
mov rsi, r13
cmp eax, 0x200000
ja 0x180031ac4
mov ecx, eax
call fcn.180033ee0
mov rsi, rax
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x11]
mov r8d, dword [rbp - 0x11]
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x79], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x50], r13
mov byte [rsp + 0x40], 0
mov r8d, 1
lea rdx, [0x180059f18]
lea rcx, [rsp + 0x40]
call fcn.1800020b0
test rsi, rsi
je 0x180031b67
mov rdx, rdi
lea rcx, [rbp - 0x69]
call fcn.180031670
mov rdi, rax
mov rdx, r12
lea rcx, [rbp - 0x49]
call fcn.180031670
mov rbx, rax
lea rcx, [rsp + 0x40]
call fcn.1800205b0
lea rcx, [rbp - 0x11]
mov qword [rsp + 0x20], rcx
mov r9, rsi
mov r8, rdi
mov rdx, rbx
mov rcx, rax
call fcn.180023770
mov ebx, eax
lea rcx, [rbp - 0x49]
call fcn.180001e50
nop
lea rcx, [rbp - 0x69]
call fcn.180001e50
nop
lea rcx, [rsp + 0x40]
call fcn.180001e50
mov rcx, rsi
call fcn.180033ed8
jmp 0x180031bc1
mov rdx, rdi
lea rcx, [rbp - 0x69]
call fcn.180031670
mov rdi, rax
mov rdx, r12
lea rcx, [rbp - 0x49]
call fcn.180031670
mov rbx, rax
lea rcx, [rsp + 0x40]
call fcn.1800205b0
mov r9, r14
mov r8, rdi
mov rdx, rbx
mov rcx, rax
call fcn.1800223a0
mov ebx, eax
lea rcx, [rbp - 0x49]
call fcn.180001e50
nop
lea rcx, [rbp - 0x69]
call fcn.180001e50
nop
lea rcx, [rsp + 0x40]
call fcn.180001e50
nop
mov r8, qword [rbp - 9]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 9]
call fcn.18000e170
mov rcx, qword [rbp - 9]
call fcn.180033ed0
mov eax, ebx
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.180033e70
add rsp, 0xe8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret