Function at 0x180046920
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x278
mov rax, qword [0x1800f7050]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rsi, rcx
mov r13, r8
mov r12, rdx
lea rcx, [rsp + 0x61]
xor ebx, ebx
xor edx, edx
mov r8d, 0x1ff
mov rdi, r9
mov byte [rsp + 0x60], bl
call fcn.1800644c0
cmp r12, 0xffffffffffffffff
je 0x180046c50
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180046a36
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov r8d, 0x200
mov rcx, r12
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180046a22
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x1800469d2
cmp eax, 0x3e6
je 0x1800469d2
test eax, eax
jle 0x180046a3d
movzx eax, ax
or eax, 0x80070000
jmp 0x180046a3b
lea rcx, [rsi + 0x10]
mov edx, 0x200
call fcn.180003cc0
test eax, eax
js 0x180046c55
cmp eax, 1
je 0x180046a3b
mov rdx, qword [rsi + 0x10]
lea r9, [rsp + 0x30]
mov r8d, 0x200
mov rcx, r12
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180046a36
mov rdx, qword [rsi + 0x10]
lea rcx, [rsp + 0x60]
mov r8d, 0x200
call fcn.180063290
cmp dword [rsp + 0x30], 0x200
je 0x180046a56
mov eax, 0xe00e1001
jmp 0x180046c55
call fcn.1800030e0
test eax, eax
js 0x180046c55
cmp eax, 1
je 0x180046c55
mov eax, 0xe00e1001
jmp 0x180046c55
cmp dword [rsp + 0xa0], 0xbeda107f
jne 0x180046a2c
mov ecx, dword [rsp + 0xa4]
mov eax, ecx
shr eax, 0x10
cmp eax, 1
je 0x180046a83
cmp ecx, 2
je 0x180046a83
mov eax, 0xe0034001
jmp 0x180046c55
test eax, eax
jne 0x180046ad8
mov dword [rsi + 0x68], ebx
mov r8d, dword [rsp + 0xa8]
mov r9d, dword [rsi + 0x68]
cmp r9d, 1
jne 0x180046b29
cmp r8d, 0x180
jb 0x180046ace
mov eax, dword [rsp + 0x1b4]
cmp eax, 0x1c8
jb 0x180046ace
mov ecx, dword [rsp + 0x1e0]
lea rdx, [rax + rcx*4]
mov eax, dword [rsp + 0x1b8]
cmp rax, rdx
jae 0x180046b29
mov eax, 0xe0034000
jmp 0x180046c55
mov dword [rsi + 0x68], 1
cmp cx, 1
jne 0x180046a8a
mov r8d, dword [rsp + 0xa8]
cmp r8d, 0x190
jae 0x180046a92
mov r8d, 0x190
mov dword [rsp + 0x234], 0x200
mov dword [rsp + 0x228], ebx
mov dword [rsp + 0x22c], ebx
mov dword [rsp + 0x230], ebx
mov dword [rsp + 0xa8], r8d
jmp 0x180046a92
xor eax, eax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
test r9d, r9d
jne 0x180046b64
cmp r8d, 1
jb 0x180046ace
lea r9, [rsp + 0x38]
lea rdx, [rsp + 0xa8]
mov r8, r13
mov rcx, rsi
call fcn.180046db0
jmp 0x180046b8a
cmp dword [rsp + 0xac], 1
jb 0x180046ace
lea r9, [rsp + 0x38]
lea rdx, [rsp + 0xa8]
mov r8, r13
mov rcx, rsi
call fcn.180046ee0
test eax, eax
je 0x180046ace
test rdi, rdi
je 0x180046ba2
cmp qword [rdi], rbx
jne 0x180046ba2
cmp qword [rdi + 8], rbx
je 0x180046bd8
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180046bbc
test rdi, rdi
jne 0x180046bc6
cmp qword [rcx], rbx
jne 0x180046bbc
cmp qword [rcx + 8], rbx
je 0x180046bd8
mov eax, 0xe0034002
jmp 0x180046c55
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x180046bbc
mov rax, qword [rdi + 8]
cmp qword [rcx + 8], rax
jne 0x180046bbc
cmp dword [rsi + 0x68], 1
jne 0x180046c25
lea rcx, [rdi + 0x10]
test rcx, rcx
je 0x180046bf2
cmp qword [rcx], rbx
jne 0x180046bf2
cmp qword [rcx + 8], rbx
je 0x180046c25
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x180046c1e
test rcx, rcx
jne 0x180046c0c
cmp qword [rdx], rbx
jne 0x180046c1e
cmp qword [rdx + 8], rbx
jmp 0x180046c1c
mov rax, qword [rcx]
cmp qword [rdx], rax
jne 0x180046c1e
mov rax, qword [rcx + 8]
cmp qword [rdx + 8], rax
je 0x180046c25
mov eax, 0xe0034003
jmp 0x180046c55
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
mov qword [rdi], rax
mov rax, qword [rcx + 8]
mov rcx, qword [rsp + 0x50]
mov qword [rdi + 8], rax
mov rax, qword [rcx]
mov qword [rdi + 0x10], rax
mov rax, qword [rcx + 8]
mov qword [rdi + 0x18], rax
xor eax, eax
jmp 0x180046c55
mov eax, 0x80070057
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.180062100
add rsp, 0x278
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret