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

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0xe0
mov qword [rbp - 0x59], 0xfffffffffffffffe
mov qword [rsp + 0x110], rbx
mov rax, qword [0x180208090]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov rbx, rdx
mov rdi, rcx
xor esi, esi
mov qword [rbp - 0x51], rsi
lea rcx, [rbp - 0x51]
call fcn.1800038c0
nop
lea ecx, [rsi + 8]
call fcn.1800d8074
mov qword [rbp - 0x29], rax
mov qword [rax], 0xffffffffffffffff
mov qword [rbp - 0x51], rax
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], esi
mov r9d, 0x40000000
mov r8, rbx
lea rdx, [rbp - 0x51]
call fcn.180091950
test al, al
je 0x18008f696
mov rax, qword [rbp - 0x51]
test rax, rax
je 0x18008f541
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x18008f541
lea rdx, [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x18008f52e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18008f541
mov ecx, dword [rbp - 0x29]
shl rcx, 0x20
add rcx, rbx
je 0x18008f541
mov bl, 1
jmp 0x18008f698
xor eax, eax
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x31], rax
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x41], xmm0
mov qword [rbp - 0x31], rsi
movdqa xmmword [rbp - 0x19], xmm0
mov qword [rbp - 9], rsi
mov qword [rbp - 1], rsi
movdqa xmmword [rbp + 7], xmm0
movdqa xmmword [rbp + 0x17], xmm0
mov qword [rbp + 0x27], rsi
mov dword [rbp + 0x2f], 0xffffffff
mov rax, qword [rdi + 0x40]
lea rcx, [rbp - 0x19]
cmp qword [rdi + 0x38], rax
jne 0x18008f592
call fcn.18008e390
jmp 0x18008f5be
lea rdx, [rdi + 0x38]
call fcn.180092fd0
lea rdx, [rdi + 0x50]
lea rcx, [rbp - 1]
call fcn.180092fd0
lea rdx, [rdi + 0x68]
lea rcx, [rbp + 0x17]
call fcn.180092fd0
mov eax, dword [rdi + 0x80]
mov dword [rbp + 0x2f], eax
lea rdx, [rbp - 0x41]
lea rcx, [rbp - 0x19]
call fcn.18008efd0
mov dword [rbp - 0x49], esi
mov rbx, qword [rbp - 0x39]
sub rbx, qword [rbp - 0x41]
mov rax, qword [rbp - 0x51]
test rax, rax
jne 0x18008f5e3
xor bl, bl
jmp 0x18008f646
cmp qword [rbp - 0x41], 0
jne 0x18008f5ee
xor bl, bl
jmp 0x18008f623
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
jne 0x18008f5fb
xor bl, bl
jmp 0x18008f623
mov qword [rsp + 0x20], rsi
lea r9, [rbp - 0x49]
mov r8d, ebx
mov rdx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov rax, qword [rbp - 0x51]
jne 0x18008f61d
xor bl, bl
jmp 0x18008f623
cmp ebx, dword [rbp - 0x49]
sete bl
test rax, rax
je 0x18008f646
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x18008f646
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18008f646
mov rax, qword [rbp - 0x51]
mov qword [rax], 0xffffffffffffffff
mov rcx, qword [rbp - 0x39]
sub rcx, qword [rbp - 0x41]
mov eax, dword [rbp - 0x49]
cmp rax, rcx
jne 0x18008f65e
test bl, bl
je 0x18008f65e
mov bl, 1
jmp 0x18008f660
xor bl, bl
lea rcx, [rbp - 0x19]
call fcn.180091a70
nop
lea rcx, [rbp - 0x41]
call fcn.180003800
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x18008f698
mov rdx, qword [rbp - 0x31]
sub rdx, rcx
call fcn.180005040
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x41], xmm0
mov qword [rbp - 0x31], rsi
jmp 0x18008f698
xor bl, bl
mov rdi, qword [rbp - 0x51]
test rdi, rdi
je 0x18008f6c8
mov rcx, qword [rdi]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18008f6b7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], rsi
mov edx, 8
mov rcx, rdi
call fcn.1800d80b0
mov qword [rbp - 0x51], rsi
lea rcx, [rbp - 0x51]
call fcn.180003800
movzx eax, bl
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1800d8050
mov rbx, qword [rsp + 0x110]
add rsp, 0xe0
pop rdi
pop rsi
pop rbp
ret