Function at 0x180042830
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbx
push r13
sub rsp, 0x88
xor r13d, r13d
mov rbx, rcx
cmp byte [rcx + 0x228], r13b
je 0x1800428b9
lea rdx, [rcx + 0x1d0]
mov rcx, qword [rcx + 0x180]
lea r8, [rax + 8]
xor r9d, r9d
mov dword [rax + 8], r13d
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x180042a38
mov eax, dword [rbx + 0x240]
cmp dword [rsp + 0xa0], eax
je 0x1800428a5
lea rdx, str.Unknown_pending_write_error._Size_of_sent_data_is_equal_to_size_of_processed_data.
lea rcx, [rsp + 0x30]
call fcn.18004e590
lea rdx, [0x1801704d0]
lea rcx, [rsp + 0x30]
call sub.MSVCR90.dll__CxxThrowException
int3
mov rcx, qword [rbx + 0x1e8]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov byte [rbx + 0x228], r13b
mov eax, dword [rbx + 0x224]
cmp eax, dword [rbx + 0x220]
je 0x180042ab6
mov qword [rsp + 0xb0], rbp
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x70], r12
lea r12, [rbx + 0x1d0]
nop dword [rax]
lea rcx, [rbx + 0x148]
mov edi, r13d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [rbx + 0x224]
cmp eax, dword [rbx + 0x220]
je 0x18004295b
nop
mov rax, qword [rbx + 0x210]
mov esi, dword [rbx + 0x220]
sub rax, qword [rbx + 0x208]
cmp rsi, rax
jb 0x18004292f
call qword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, edi
add rax, qword [rbx + 0x208]
mov eax, dword [rax + rsi + 8]
add eax, 0x10
add eax, edi
cmp eax, dword [rbx + 0x22c]
ja 0x18004295b
mov edi, eax
mov eax, dword [rbx + 0x224]
sub eax, dword [rbx + 0x220]
cmp edi, eax
jne 0x180042910
mov rax, qword [rbx + 0x210]
mov esi, dword [rbx + 0x220]
sub rax, qword [rbx + 0x208]
cmp rsi, rax
jb 0x18004297a
call qword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov rax, qword [rbx + 0x208]
mov rcx, qword [rbx + 0x230]
mov r8d, edi
lea rdx, [rsi + rax]
call sub.MSVCR90.dll_memcpy
add dword [rbx + 0x220], edi
mov eax, dword [rbx + 0x220]
mov dword [rbx + 0x240], edi
cmp eax, dword [rbx + 0x224]
jne 0x1800429bc
mov dword [rbx + 0x220], r13d
mov dword [rbx + 0x224], r13d
lea rcx, [rbx + 0x148]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, qword [rbx + 0x230]
mov rcx, qword [rbx + 0x180]
lea r9, [rsp + 0xa8]
mov r8d, edi
mov dword [rsp + 0xa8], r13d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x180042a95
cmp eax, 0x3e4
je 0x180042a95
test edi, edi
je 0x180042a6f
mov rcx, qword [rbx + 0x1e8]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [rbx + 0x224]
cmp eax, dword [rbx + 0x220]
jne 0x1800428f0
jmp 0x180042a9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e4
je 0x180042ab6
test eax, eax
je 0x180042ab6
lea rdx, str.Send_pending_operation_problems.___s
lea rcx, [rsp + 0x40]
mov r8d, eax
call fcn.18004e5e0
lea rdx, [0x1801704f0]
lea rcx, [rsp + 0x40]
call sub.MSVCR90.dll__CxxThrowException
int3
lea rdx, str.Data_send_problems.___s
lea rcx, [rsp + 0x58]
mov r8d, eax
call fcn.18004e5e0
lea rdx, [0x1801704f0]
lea rcx, [rsp + 0x58]
call sub.MSVCR90.dll__CxxThrowException
int3
mov byte [rbx + 0x228], 1
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xb0]
mov r12, qword [rsp + 0x70]
add rsp, 0x88
pop r13
pop rbx
ret