Function at 0x180042bd0
Capabilities:
Get file size
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xd0
mov qword [rbp - 9], 0xfffffffffffffffe
mov qword [rsp + 0x110], rbx
mov rax, qword [0x1802247b8]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov rbx, rdx
mov rsi, rcx
mov ecx, 8
call fcn.180139f6c
mov qword [rbp + 7], rax
xor r15d, r15d
test rax, rax
je 0x180042c27
mov qword [rax], 0xffffffffffffffff
jmp 0x180042c2a
mov rax, r15
mov qword [rbp + 7], rax
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], r15d
mov r9d, 0x40000000
mov r8, rbx
lea rdx, [rbp + 7]
call fcn.180044a80
mov rbx, qword [rbp + 7]
test al, al
je 0x180042e10
test rbx, rbx
je 0x180042c99
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x180042c99
lea rdx, [rbp + 0x27]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x180042c82
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180042c99
mov ecx, dword [rbp + 0x27]
shl rcx, 0x20
mov rax, rdi
add rcx, rdi
je 0x180042c99
mov dil, 1
jmp 0x180042e13
xor eax, eax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], rax
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xf], xmm0
mov qword [rbp + 0x1f], r15
movdqa xmmword [rbp - 0x59], xmm0
mov qword [rbp - 0x49], r15
mov qword [rbp - 0x41], r15
movdqa xmmword [rbp - 0x39], xmm0
movdqa xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x19], r15
mov dword [rbp - 0x11], 0xffffffff
lea rdi, [rsi + 0x38]
mov rax, qword [rdi + 8]
lea rcx, [rbp - 0x59]
cmp qword [rdi], rax
jne 0x180042ced
call fcn.180040be0
jmp 0x180042d15
mov rdx, rdi
call fcn.180047750
lea rdx, [rdi + 0x18]
lea rcx, [rbp - 0x41]
call fcn.180047750
lea rdx, [rdi + 0x30]
lea rcx, [rbp - 0x29]
call fcn.180047750
mov eax, dword [rdi + 0x48]
mov dword [rbp - 0x11], eax
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x59]
call fcn.1800426c0
mov dword [rbp - 1], r15d
mov rsi, qword [rbp + 0x17]
mov r14, qword [rbp + 0xf]
sub rsi, r14
test rbx, rbx
jne 0x180042d3b
xor dil, dil
jmp 0x180042d92
test r14, r14
jne 0x180042d45
xor dil, dil
jmp 0x180042d78
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
jne 0x180042d53
xor dil, dil
jmp 0x180042d78
mov qword [rsp + 0x20], r15
lea r9, [rbp - 1]
mov r8d, esi
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180042d71
xor dil, dil
jmp 0x180042d78
cmp esi, dword [rbp - 1]
sete dil
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x180042d92
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180042d92
mov qword [rbx], 0xffffffffffffffff
mov eax, dword [rbp - 1]
cmp rax, rsi
jne 0x180042da4
test dil, dil
je 0x180042da4
mov dil, 1
jmp 0x180042da7
xor dil, dil
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x180042dc1
call fcn.180139b7c
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x19], r15
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x180042ddb
call fcn.180139b7c
mov qword [rbp - 0x41], r15
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x39], xmm0
mov rcx, qword [rbp - 0x59]
test rcx, rcx
je 0x180042df5
call fcn.180139b7c
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x59], xmm0
mov qword [rbp - 0x49], r15
test r14, r14
je 0x180042e13
mov rcx, r14
call fcn.180139b7c
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xf], xmm0
mov qword [rbp + 0x1f], r15
jmp 0x180042e13
xor dil, dil
test rbx, rbx
je 0x180042e3a
mov rcx, qword [rbx]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x180042e2e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov rcx, rbx
call fcn.180139b7c
mov qword [rbp + 7], r15
movzx eax, dil
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.180139310
mov rbx, qword [rsp + 0x110]
add rsp, 0xd0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret