Function at 0x14000fa3c
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.14000fc38
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 0x140022fca
cmp dword [rbp - 0x29], ebx
jne 0x140022ff4
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.14000fba8
mov rbx, qword [rdi + 8]
mov r15, qword [rdi + 0x10]
cmp rbx, r15
je 0x14000fb77
mov eax, dword [rbx]
lea rdx, [rbp - 0x21]
mov rcx, r14
mov dword [rbp - 0x21], eax
call fcn.14000fba8
mov eax, dword [rbx + 0x18]
lea rdx, [rbp - 0x29]
mov rcx, r14
mov dword [rbp - 0x29], eax
call fcn.14000fba8
cmp qword [rbx + 0x20], 8
lea rsi, [rbx + 8]
jae 0x14000fb72
mov eax, dword [rbp - 0x29]
lea rdx, [rbp - 0x15]
mov r8d, 2
mov dword [rbp - 0x1d], eax
lea rcx, [rbp - 0x1d]
call fcn.14000fc38
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 0x1400230c4
cmp dword [rbp - 0x25], r12d
jne 0x14002305c
add rbx, 0x28
jmp 0x14000faeb
mov rsi, qword [rsi]
jmp 0x14000fb22
lea rcx, [rdi + 8]
call fcn.14000e780
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140011610
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, [0x140055478]
lea rcx, [rbp - 0x11]
call fcn.14002e184
lea rdx, [0x1400584e8]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.WriteFile_returned_incorrect_message_length:
lea rcx, [rbp + 0xf]
call fcn.14002da58
mov edx, dword [rbp - 0x29]
lea rcx, [rbp - 0x11]
call fcn.14002d9c8
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.14002e614
lea rcx, [rbp - 0x11]
call fcn.14002ded8
cmp qword [rbp + 0x27], 0x10
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x11]
cmovae rdx, qword [rbp + 0xf]
call fcn.14000d864
lea rdx, [0x1400584e8]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.WriteFile_returned_incorrect_message_length:
lea rcx, [rbp + 0xf]
call fcn.14002da58
mov edx, dword [rbp - 0x25]
lea rcx, [rbp - 0x11]
call fcn.14002d9c8
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.14002e614
lea rcx, [rbp - 0x11]
call fcn.14002ded8
cmp qword [rbp + 0x27], 0x10
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x11]
cmovae rdx, qword [rbp + 0xf]
call fcn.14000d864
lea rdx, [0x1400584e8]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140055478]
lea rcx, [rbp - 0x11]
call fcn.14002e184
lea rdx, [0x1400584e8]
lea rcx, [rbp - 0x11]
call sub.VCRUNTIME140.dll__CxxThrowException
int3