Function at 0x180036c00
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
sub rsp, 0x1c8
mov rax, qword [0x1800ff050]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
mov r12, r9
mov rdi, r8
mov rbp, rdx
mov rsi, rcx
cmp rcx, 0xffffffffffffffff
je 0x180036fad
mov qword [rsp + 0x1c0], rbx
xor ebx, ebx
test r8, r8
je 0x180036c8e
xor eax, eax
lea r9d, [rbx + 2]
lea rdx, [rbx - 0x16]
mov qword [r8], rax
mov qword [r8 + 8], rax
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036c8e
lea r9, [rsp + 0x1a8]
lea r8d, [rbx + 0x10]
mov rdx, rdi
mov rcx, rsi
mov dword [rsp + 0x1a8], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180036ef5
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036ef5
xor eax, eax
lea r9, [rsp + 0x30]
mov rdx, rbp
mov qword [rbp], rax
lea r8d, [rax + 0x10]
mov rcx, rsi
mov qword [rbp + 8], rax
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180036ef5
mov ax, word [rbp]
cmp ax, word [0x1800e31f0]
je 0x180036d10
mov dword [r12], ebx
xor eax, eax
mov rbx, qword [rsp + 0x1c0]
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.18006a4f0
add rsp, 0x1c8
pop r12
pop rdi
pop rsi
pop rbp
ret
xor eax, eax
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0xf8
mov qword [rsp + 0x140], rax
mov qword [rsp + 0x148], rax
mov qword [rsp + 0x150], rax
mov qword [rsp + 0x158], rax
mov qword [rsp + 0x160], rax
mov qword [rsp + 0x168], rax
mov qword [rsp + 0x170], rax
mov qword [rsp + 0x178], rax
call fcn.18006cf60
xor edx, edx
lea rcx, [rsp + 0x180]
lea r8d, [rdx + 0x28]
call fcn.18006cf60
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036ef5
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x140]
mov r8d, 0x40
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180036ef5
movsxd rdx, dword [rsp + 0x17c]
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036ef5
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov r8d, 0xf8
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180036ef5
movzx eax, word [rsp + 0x46]
mov r9d, 1
xor r8d, r8d
dec eax
mov rcx, rsi
cdqe
lea rdx, [rax + rax*4]
shl rdx, 3
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036ef5
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x180]
mov r8d, 0x28
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180036ef5
mov ecx, dword [rsp + 0x194]
mov eax, dword [rsp + 0x190]
xor r9d, r9d
add ecx, eax
xor r8d, r8d
mov edi, ecx
mov edx, ecx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036ef5
xor eax, eax
lea r9, [rsp + 0x30]
mov rdx, rbp
mov qword [rbp], rax
lea r8d, [rax + 0x10]
mov rcx, rsi
mov qword [rbp + 8], rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180036ef5
movabs rax, 0xdeadbeef00000000
cmp qword [rbp], rax
jne 0x180036eff
lea rdx, [rdi + 4]
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036ef5
xor eax, eax
lea r9, [rsp + 0x30]
mov rdx, rbp
mov qword [rbp], rax
lea r8d, [rax + 0x10]
mov rcx, rsi
mov qword [rbp + 8], rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180036f9e
call fcn.180003180
jmp 0x180036ceb
xor eax, eax
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x1a9], eax
mov word [rsp + 0x1ad], ax
mov byte [rsp + 0x1af], al
mov eax, dword [rbp]
mov rcx, rsi
mov byte [rsp + 0x1a8], bl
lea rdx, [rdi + rax + 4]
mov dword [rsp + 0x30], ebx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180036f9e
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x1a8]
mov r8d, 8
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180036f9e
cmp dword [rsp + 0x30], ebx
je 0x180036f9e
lea rax, [rsp + 0x1a8]
lea rcx, [0x1800e31f4]
mov dx, word [rax]
cmp dx, word [rcx]
jne 0x180036f87
mov dl, byte [rax + 2]
cmp dl, byte [rcx + 2]
je 0x180036f8e
sbb eax, eax
sbb eax, 0xffffffff
mov ebx, eax
test ebx, ebx
jne 0x180036f9e
mov rax, qword [rsp + 0x1a8]
mov qword [rbp], rax
mov dword [r12], 1
xor eax, eax
jmp 0x180036ceb
mov eax, 0x80070057
jmp 0x180036cf3