Function at 0x140056410
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 0x14005666a
or rsi, 0xffffffffffffffff
cmp rdx, rsi
je 0x14005666a
mov r14d, 0x80070000
test r8, r8
je 0x140056534
test byte [r8 + 0x40], 8
jne 0x140056534
mov rcx, r8
call fcn.140059734
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 0x1400564d8
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 0x1400564cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
jmp 0x1400564d0
mov ebx, 0x80004005
test ebx, ebx
js 0x14005665a
mov r8, qword [rbp + 0x58]
lea rdx, str._I64u
lea rcx, [rbp + 0x40]
call fcn.14002d398
mov r14, qword [rbp + 0x40]
mov ebx, eax
test eax, eax
js 0x14005650d
mov r9, r14
lea rdx, str.WIMTOTALBYTES
xor r8d, r8d
mov rcx, r15
call fcn.14002f7fc
mov ebx, eax
test r14, r14
je 0x140056537
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 0x140056537
mov ebx, r13d
test ebx, ebx
js 0x14005665a
mov r14, qword [r15]
test r14, r14
je 0x140056583
lea rdx, [rbp - 0x10]
mov rcx, r14
call fcn.140033628
mov ebx, eax
test eax, eax
js 0x140056588
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.1400333b4
mov rdi, qword [rbp + 0x60]
mov ebx, eax
jmp 0x140056588
mov ebx, 0x80070057
test ebx, ebx
js 0x140056635
inc rsi
cmp word [rdi + rsi*2], r13w
jne 0x140056590
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 0x140056635
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 0x1400565f9
mov eax, dword [rbp + 0x58]
mov ecx, esi
sub rcx, 2
cmp rax, rcx
jne 0x1400565f9
mov ebx, r13d
jmp 0x140056635
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 0x140056630
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, esi
test eax, eax
cmovle ebx, eax
jmp 0x140056635
mov ebx, 0x80004005
test rdi, rdi
je 0x14005665a
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.140055034
not ebx
shr ebx, 0x1f
mov eax, ebx
jmp 0x14005667d
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