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

Disassembly:
or r8d, 0xffffffff
xor edx, edx
jmp 0x1400c59ac
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rbx, rcx
xor r13d, r13d
mov rcx, qword [0x1409d7980]
mov ebp, r13d
mov r12d, r8d
mov r15d, edx
call fcn.14011c668
mov rsi, rax
call fcn.1400c5984
test rbx, rbx
mov qword [rsp + 0x30], r13
lea rdi, [0x140222000]
mov dword [rsi + 0x14], r13d
cmovne rdi, rbx
lea r8d, [r13 + 1]
mov r14d, pe_nt_image_headers64
lea ebx, [r13 + 3]
mov rcx, rdi
mov dword [rsp + 0x28], r14d
xor r9d, r9d
mov dword [rsp + 0x20], ebx
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
jne 0x1400c5a92
mov qword [rsp + 0x30], r13
lea r8d, [r13 + 1]
mov dword [rsp + 0x28], r14d
xor r9d, r9d
mov r14d, 0x80000000
mov dword [rsp + 0x20], ebx
mov edx, r14d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
jne 0x1400c5a81
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov r8d, ebx
mov edx, r14d
mov dword [rsp + 0x20], ebx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi], rax
mov dword [rsi + 0x14], 1
cmp rax, 0xffffffffffffffff
je 0x1400c5e00
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp r12d, 2
mov r14d, 0xfde9
mov eax, r14d
cmovne eax, r13d
mov dword [rsi + 0x28], eax
mov dword [rsi + 0x50], r15d
cmp rdi, rbx
jb 0x1400c5b1b
mov rcx, qword [rsi]
lea r9, [rsp + 0x98]
mov r8d, ebx
mov qword [rsp + 0x20], r13
lea rdx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x98], ebx
jne 0x1400c5b0a
mov r8, rbx
lea rdx, [0x14023a99c]
lea rcx, [rsp + 0x80]
call fcn.1400966a0
test eax, eax
jne 0x1400c5b0a
mov dword [rsi + 0x28], r14d
sub rdi, rbx
jmp 0x1400c5b1b
mov rcx, qword [rsi]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
test rdi, rdi
jle 0x1400c5c22
mov rcx, qword [0x14095a988]
lea r8, [rdi + 2]
xor edx, edx
cmp dword [rsi + 0x28], r13d
jne 0x1400c5bef
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x1400c5c22
mov rcx, qword [0x14095a988]
lea r8, [rdi*4 + 2]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsi + 0x18], rax
test rax, rax
je 0x1400c5c22
mov rcx, qword [rsi]
lea r9, [rsp + 0x98]
mov r8d, edi
mov qword [rsp + 0x20], r13
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rax, dword [rsp + 0x98]
mov rcx, r15
mov byte [rax + r15], r13b
call fcn.1401b0010
mov rcx, rax
mov rdi, rax
call fcn.1401afc40
mov rcx, qword [rsi + 0x18]
mov rdx, rax
mov rbx, rax
call fcn.1401d1e30
mov rcx, rbx
call fcn.1401afc30
mov rcx, rdi
call fcn.1401afe60
mov rcx, qword [rsi + 0x18]
call fcn.1401d1f00
mov dword [rsi + 0x28], r14d
mov r8, r15
mov rcx, qword [0x14095a988]
xor edx, edx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1400c5c22
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsi + 0x18], rax
test rax, rax
je 0x1400c5c22
mov rcx, qword [rsi]
lea r9, [rsp + 0x98]
mov r8d, edi
mov qword [rsp + 0x20], r13
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rdi, dword [rsp + 0x98]
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x1400c5e44
mov word [rax + rdi], r13w
mov rbx, qword [rsi + 0x18]
lea rax, [rbx + rdi]
mov qword [rsi + 0x20], rax
cmp rbx, rax
jae 0x1400c5e44
mov r15d, 0x20
mov r12b, 0xa
mov dil, 0xd
mov r14d, 1
mov al, byte [rbx]
cmp al, r15b
je 0x1400c5c66
cmp al, 9
jne 0x1400c5c6b
add rbx, r14
jmp 0x1400c5c5b
cmp al, 0x3b
jne 0x1400c5cc7
add rbx, r14
cmp byte [rbx], r15b
jne 0x1400c5c7a
add rbx, r14
mov edx, r15d
test rbp, rbp
je 0x1400c5c8c
mov rcx, rbp
call fcn.14011d33c
jmp 0x1400c5c95
lea rcx, [rsi + 0x30]
call fcn.14011d2f8
lea rbp, [rax - 0x10]
mov qword [rbp + 0x10], 2
mov qword [rbp + 0x18], rbx
jmp 0x1400c5cbc
cmp al, r12b
je 0x1400c5de4
cmp al, dil
je 0x1400c5de4
add rbx, r14
mov al, byte [rbx]
test al, al
jne 0x1400c5ca7
jmp 0x1400c5de4
cmp al, 0x5b
jne 0x1400c5d49
add rbx, r14
mov edx, r15d
test rbp, rbp
je 0x1400c5ce0
mov rcx, rbp
call fcn.14011d33c
jmp 0x1400c5ce9
lea rcx, [rsi + 0x30]
call fcn.14011d2f8
lea rbp, [rax - 0x10]
mov qword [rbp + 0x10], r14
mov qword [rbp + 0x18], rbx
mov al, byte [rbx]
test al, al
je 0x1400c5d19
mov cl, al
mov al, cl
cmp cl, 0x5d
je 0x1400c5d19
cmp cl, r12b
je 0x1400c5d19
cmp cl, dil
je 0x1400c5d19
add rbx, r14
mov al, byte [rbx]
mov cl, al
test al, al
jne 0x1400c5cfd
mov byte [rbx], r13b
inc rbx
cmp al, 0x5d
jne 0x1400c5dea
jmp 0x1400c5d3e
cmp al, r12b
je 0x1400c5dea
cmp al, dil
je 0x1400c5dea
add rbx, r14
mov al, byte [rbx]
test al, al
jne 0x1400c5d29
jmp 0x1400c5dea
cmp al, r12b
je 0x1400c5dea
cmp al, dil
je 0x1400c5dea
mov rdi, rbx
jmp 0x1400c5d79
cmp al, 0x3d
ja 0x1400c5d74
movabs rcx, 0x2000000000002400
bt rcx, rax
jb 0x1400c5d7d
add rbx, r14
mov al, byte [rbx]
test al, al
jne 0x1400c5d60
lea rax, [rbx - 1]
jmp 0x1400c5d90
cmp byte [rax], r15b
je 0x1400c5d8d
cmp byte [rax], 9
jne 0x1400c5d95
sub rax, r14
cmp rax, rdi
ja 0x1400c5d83
mov byte [rax + 1], r13b
add rbx, r14
cmp byte [rbx], r15b
je 0x1400c5d99
cmp byte [rbx], 9
je 0x1400c5d99
mov edx, r15d
test rbp, rbp
je 0x1400c5db8
mov rcx, rbp
call fcn.14011d33c
jmp 0x1400c5dc1
lea rcx, [rsi + 0x30]
call fcn.14011d2f8
lea rbp, [rax - 0x10]
mov qword [rbp + 0x10], rdi
mov qword [rbp + 0x18], rbx
jmp 0x1400c5ddb
cmp al, r12b
je 0x1400c5de1
cmp al, 0xd
je 0x1400c5de1
add rbx, r14
mov al, byte [rbx]
test al, al
jne 0x1400c5dcf
mov dil, 0xd
mov byte [rbx], r13b
add rbx, r14
cmp byte [rbx], r12b
je 0x1400c5de7
cmp byte [rbx], dil
je 0x1400c5de7
cmp rbx, qword [rsi + 0x20]
jb 0x1400c5c55
jmp 0x1400c5e44
mov r14d, 0xfde9
mov qword [rsi], r13
mov rcx, rdi
mov dword [rsi + 0x28], r14d
mov dword [rsi + 0x50], r15d
call fcn.14008730c
mov rcx, qword [0x14095a988]
xor edx, edx
lea r8, [rax*2 + 2]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsi + 8], rax
test rax, rax
je 0x1400c5e44
mov rdx, rdi
mov rcx, rax
call fcn.1401d02a0
mov rax, qword [rsi]
mov rbx, qword [rsp + 0x88]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret