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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor r13d, r13d
mov r12, rdx
mov qword [rbp + 0x60], r13
mov r15, rcx
mov qword [rbp - 0x20], r13
mov edi, r13d
test rcx, rcx
je 0x14001124a
or rsi, 0xffffffffffffffff
cmp rdx, rsi
je 0x14001124a
mov r14d, 0x80070000
test r8, r8
je 0x140011114
test byte [r8 + 0x40], 8
jne 0x140011114
mov rcx, r8
call fcn.140007a00
lea rdx, [rbp + 0x58]
mov qword [rbp + 0x58], r13
mov rcx, rax
mov qword [rbp + 0x40], r13
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
jne 0x1400110b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, r14d
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x1400110ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
jmp 0x1400110b0
mov ebx, 0x80004005
test ebx, ebx
js 0x14001123a
mov r8, qword [rbp + 0x58]
lea rdx, str._I64u
lea rcx, [rbp + 0x40]
call fcn.1400039f0
mov r14, qword [rbp + 0x40]
mov ebx, eax
test eax, eax
js 0x1400110ed
mov r9, r14
lea rdx, str.WIMTOTALBYTES
xor r8d, r8d
mov rcx, r15
call fcn.140049a08
mov ebx, eax
test r14, r14
je 0x140011117
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140011117
mov ebx, r13d
test ebx, ebx
js 0x14001123a
mov r14, qword [r15]
test r14, r14
je 0x140011163
lea rdx, [rbp - 0x10]
mov rcx, r14
call fcn.14004d998
mov ebx, eax
test eax, eax
js 0x140011168
movaps xmm0, xmmword [rbp - 0x10]
lea r9, [rbp - 0x20]
lea r8, [rbp + 0x60]
movdqa xmmword [rbp - 0x10], xmm0
lea rdx, [rbp - 0x10]
mov dword [rsp + 0x20], r13d
mov rcx, r14
call fcn.14004d724
mov rdi, qword [rbp + 0x60]
mov ebx, eax
jmp 0x140011168
mov ebx, 0x80070057
test ebx, ebx
js 0x140011215
inc rsi
cmp word [rdi + rsi*2], r13w
jne 0x140011170
lea rax, [rsi*2 + 2]
mov ecx, 0xffffffff
cmp rax, rcx
mov esi, ecx
cmovbe esi, eax
cmp rcx, rax
sbb ebx, ebx
and ebx, 0x80070216
cmp rax, rcx
ja 0x140011215
lea r8d, [rsi - 2]
mov dword [rbp + 0x58], r13d
lea r9, [rbp + 0x58]
mov qword [rsp + 0x20], r13
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
je 0x1400111d9
mov eax, dword [rbp + 0x58]
mov ecx, esi
sub rcx, 2
cmp rax, rcx
jne 0x1400111d9
mov ebx, r13d
jmp 0x140011215
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
mov esi, 0x80070000
or ecx, esi
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x140011210
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, esi
test eax, eax
cmovle ebx, eax
jmp 0x140011215
mov ebx, 0x80004005
test rdi, rdi
je 0x14001123a
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov ecx, ebx
call fcn.14000fc8c
not ebx
shr ebx, 0x1f
mov eax, ebx
jmp 0x14001125d
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret