Function at 0x180009580
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x180015060]
xor rax, rsp
mov qword [rbp - 8], rax
mov r12d, ecx
mov qword [rbp - 0x30], rdx
mov ecx, 0x30032
mov r13, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
xor edi, edi
mov r14, rax
test rax, rax
jne 0x1800095cc
or eax, 0xffffffff
jmp 0x1800098c0
lea r9, [rbp - 0x38]
mov rdx, r14
lea r8, [rbp - 0x40]
mov ecx, r12d
call fcn.1800098e4
cmp eax, 0xffffffff
je 0x1800098b2
mov rdx, qword [rbp - 0x38]
xor r8d, r8d
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
test rax, rax
js 0x1800098b2
mov r8d, 0x400
mov rdx, r14
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov r15d, eax
test eax, eax
js 0x1800098b2
cmp byte [r14 + 1], 0x4b
mov ecx, edi
mov edx, edi
mov rsi, r14
sete dl
cmp byte [r14 + 3], 2
sete cl
and edx, ecx
mov ecx, edi
cmp byte [r14 + 2], 1
cmove ecx, edx
cmp byte [r14], 0x50
mov eax, edi
sete al
test eax, ecx
je 0x1800098b2
cmp r15d, 0x2e
jge 0x18000968a
movsxd rbx, r15d
mov rdx, rsi
mov r8, rbx
mov rcx, r14
call sub.VCRUNTIME140.dll_memmove
lea rdx, [rbx + r14]
mov r8d, 0x400
mov ecx, r12d
mov rsi, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
test eax, eax
jle 0x1800098b2
add r15d, eax
movzx eax, byte [rsi + 0x20]
movzx edx, byte [rsi + 0x21]
movzx ecx, byte [rsi + 0x1f]
movzx ebx, byte [rsi + 0x1d]
shl ebx, 8
shl edx, 8
or edx, eax
shl ecx, 8
movzx eax, byte [rsi + 0x1e]
or ecx, eax
movzx eax, byte [rsi + 0x1c]
or ebx, eax
add edx, ecx
add ebx, 0x2e
add ebx, edx
lea eax, [rbx + 4]
cmp r15d, eax
jge 0x18000970a
movsxd rax, r15d
cmp rsi, r14
je 0x1800096dc
mov r8, rax
mov rdx, rsi
mov rcx, r14
call sub.VCRUNTIME140.dll_memmove
mov rsi, rax
movsxd rax, r15d
mov ecx, 0x400
lea rdx, [rax + r14]
mov r8d, ebx
sub r8d, r15d
add r8d, 4
cmp r8d, ecx
cmovl r8d, ecx
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
test eax, eax
jle 0x1800098b2
add r15d, eax
mov rcx, r13
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
movzx edx, byte [rsi + 0x1d]
movzx ecx, byte [rsi + 0x1c]
shl rdx, 8
or rdx, rcx
cmp rdx, rax
jne 0x180009741
mov rcx, r13
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov r8, rax
lea rcx, [rsi + 0x2e]
mov rdx, r13
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x18000976e
sub r15d, ebx
mov eax, ebx
add rsi, rax
mov edx, edi
mov eax, edi
mov ecx, edi
cmp byte [rsi + 1], 0x4b
sete dl
cmp byte [rsi + 3], 2
sete al
and edx, eax
cmp byte [rsi + 2], 1
cmove ecx, edx
cmp byte [rsi], 0x50
jmp 0x180009645
movzx eax, byte [rsi + 0x2c]
xor r8d, r8d
movzx edx, byte [rsi + 0x2d]
mov ecx, r12d
shl rdx, 8
or rdx, rax
movzx eax, byte [rsi + 0x2b]
shl rdx, 8
or rdx, rax
movzx eax, byte [rsi + 0x2a]
shl rdx, 8
or rdx, rax
add rdx, qword [rbp - 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
test rax, rax
js 0x1800098b2
mov r8d, 0x1e
lea rdx, [rbp - 0x28]
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
test eax, eax
js 0x1800098b2
cmp byte [rbp - 0x27], 0x4b
mov eax, edi
mov edx, edi
mov ecx, edi
sete dl
cmp byte [rbp - 0x28], 0x50
sete al
and edx, eax
mov eax, edi
cmp byte [rbp - 0x26], 3
cmove ecx, edx
cmp byte [rbp - 0x25], 4
sete al
test eax, ecx
je 0x1800098b2
movzx eax, byte [rsi + 0x1a]
movzx ecx, byte [rsi + 0x1b]
mov r9, qword [rbp - 0x30]
movzx edx, byte [rbp - 0xd]
shl rcx, 8
or rcx, rax
shl edx, 8
movzx eax, byte [rsi + 0x19]
shl rcx, 8
or rcx, rax
movzx eax, byte [rsi + 0x18]
shl rcx, 8
or rcx, rax
mov qword [r9], rcx
movzx eax, byte [rsi + 0x16]
movzx ecx, byte [rsi + 0x17]
shl rcx, 8
or rcx, rax
movzx eax, byte [rsi + 0x15]
shl rcx, 8
or rcx, rax
movzx eax, byte [rsi + 0x14]
shl rcx, 8
or rcx, rax
mov qword [r9 + 8], rcx
movzx eax, byte [rsi + 0x2c]
movzx r8d, byte [rsi + 0x2d]
movzx ecx, byte [rbp - 0xb]
shl r8, 8
or r8, rax
shl ecx, 8
movzx eax, byte [rsi + 0x2b]
shl r8, 8
or r8, rax
movzx eax, byte [rsi + 0x2a]
shl r8, 8
or r8, rax
movzx eax, byte [rbp - 0xe]
or rdx, rax
movzx eax, byte [rbp - 0xc]
add rdx, qword [rbp - 0x40]
or rcx, rax
add rcx, 0x1e
lea rax, [r8 + rdx]
add rax, rcx
mov qword [r9 + 0x10], rax
movzx ecx, byte [rsi + 0xb]
movzx eax, byte [rsi + 0xa]
shl ecx, 8
or ecx, eax
mov dword [r9 + 0x18], ecx
jmp 0x1800098b5
or edi, 0xffffffff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, edi
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.18000b420
mov rbx, qword [rsp + 0xb8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret