Function at 0x14000d5f4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rax, qword [0x14005b018]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov eax, dword [rdx]
mov rdi, rdx
mov r14, rcx
mov dword [rbp - 0x21], eax
lea rdx, [rbp - 0x1d]
mov dword [rbp - 0x25], 1
lea rcx, [rbp - 0x25]
mov r8d, 4
call fcn.14000d7f0
mov rcx, qword [r14]
lea r9, [rbp - 0x29]
and qword [rsp + 0x20], 0
lea rdx, [rbp - 0x21]
mov ebx, dword [rax]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140022410
cmp dword [rbp - 0x29], ebx
jne 0x14002243a
mov rax, qword [rdi + 0x10]
lea rdx, [rbp - 0x19]
sub rax, qword [rdi + 8]
movabs rcx, 0xcccccccccccccccd
sar rax, 3
imul rax, rcx
mov rcx, r14
mov dword [rbp - 0x19], eax
call fcn.14000d760
mov rbx, qword [rdi + 8]
mov r15, qword [rdi + 0x10]
cmp rbx, r15
je 0x14000d72f
mov eax, dword [rbx]
lea rdx, [rbp - 0x21]
mov rcx, r14
mov dword [rbp - 0x21], eax
call fcn.14000d760
mov eax, dword [rbx + 0x18]
lea rdx, [rbp - 0x29]
mov rcx, r14
mov dword [rbp - 0x29], eax
call fcn.14000d760
cmp qword [rbx + 0x20], 8
lea rsi, [rbx + 8]
jae 0x14000d72a
mov eax, dword [rbp - 0x29]
lea rdx, [rbp - 0x15]
mov r8d, 2
mov dword [rbp - 0x1d], eax
lea rcx, [rbp - 0x1d]
call fcn.14000d7f0
mov rcx, qword [r14]
lea r9, [rbp - 0x25]
and qword [rsp + 0x20], 0
mov rdx, rsi
mov r12d, dword [rax]
mov r8d, r12d
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14002250a
cmp dword [rbp - 0x25], r12d
jne 0x1400224a2
add rbx, 0x28
jmp 0x14000d6a3
mov rsi, qword [rsi]
jmp 0x14000d6da
lea rcx, [rdi + 8]
call fcn.14000e5ac
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140011450
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140054eb8]
lea rcx, [rbp - 0x11]
call fcn.14002e130
lea rdx, [0x140057f28]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.WriteFile_returned_incorrect_message_length:
lea rcx, [rbp + 0xf]
call fcn.14002d9c4
mov edx, dword [rbp - 0x29]
lea rcx, [rbp - 0x11]
call fcn.14002d934
cmp qword [rbp + 7], 0x10
lea rdx, [rbp - 0x11]
mov r8, qword [rbp - 1]
lea rcx, [rbp + 0xf]
cmovae rdx, qword [rbp - 0x11]
call fcn.14002e5c0
lea rcx, [rbp - 0x11]
call fcn.14002de84
cmp qword [rbp + 0x27], 0x10
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x11]
cmovae rdx, qword [rbp + 0xf]
call fcn.14002db80
lea rdx, [0x140057f28]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.WriteFile_returned_incorrect_message_length:
lea rcx, [rbp + 0xf]
call fcn.14002d9c4
mov edx, dword [rbp - 0x25]
lea rcx, [rbp - 0x11]
call fcn.14002d934
cmp qword [rbp + 7], 0x10
lea rdx, [rbp - 0x11]
mov r8, qword [rbp - 1]
lea rcx, [rbp + 0xf]
cmovae rdx, qword [rbp - 0x11]
call fcn.14002e5c0
lea rcx, [rbp - 0x11]
call fcn.14002de84
cmp qword [rbp + 0x27], 0x10
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x11]
cmovae rdx, qword [rbp + 0xf]
call fcn.14002db80
lea rdx, [0x140057f28]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140054eb8]
lea rcx, [rbp - 0x11]
call fcn.14002e130
lea rdx, [0x140057f28]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3