Function at 0x180013240
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2e8
mov rax, qword [0x180069028]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov rax, qword [rsp + 0x360]
lea r12, [rdx + 0x40]
mov qword [rdx + 0x70], rax
xor r15d, r15d
xor eax, eax
mov dword [rdx + 8], 3
mov dword [rdx + 0x88], r15d
mov rbx, r8
mov qword [rdx + 0x80], rbx
mov r14, r9
mov qword [rdx + 0xa0], r15
mov rdi, rdx
mov qword [rdx + 0xa8], 0xffffffffffffffff
mov rbp, rcx
mov qword [r12], rax
mov qword [r12 + 8], rax
mov qword [r12 + 0x10], rax
mov qword [r12 + 0x18], rax
cmp dword [r8 + 0x110], eax
je 0x180013428
cmp dword [r8 + 0x138], 3
mov eax, dword [r9]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x40], 1
je 0x18001333f
lea rsi, [r8 + 0x130]
xor eax, eax
mov dword [rsi + 8], 3
mov qword [rsi + 0x70], rax
lea r15, [rsi + 0x40]
mov qword [rsi + 0x80], rbx
xor r9d, r9d
mov dword [rsi + 0x88], 1
xor r8d, r8d
mov qword [r15], rax
lea edx, [rax + 1]
mov qword [r15 + 8], rax
xor ecx, ecx
mov qword [r15 + 0x10], rax
mov qword [r15 + 0x18], rax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsi + 0x58], rax
test rax, rax
jne 0x180013357
jmp 0x1800136fc
mov ecx, 0xb0
call qword [fcn.18001fa14]
mov rsi, rax
test rax, rax
jne 0x1800132ef
jmp 0x180013711
test byte [rsp + 0x40], 2
lea rdx, [rsp + 0x40]
mov rcx, qword [rbx + 0x118]
mov eax, 0x288
mov r8d, select
mov qword [rsp + 0x20], r15
cmovne r8d, eax
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800133c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x1800133af
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsi + 0x58]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x1800136d8
mov rcx, qword [rsi + 0x58]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x180013396
mov rcx, qword [rsi + 0x58]
xor r15d, r15d
mov qword [rsi + 0x60], r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x58], r15
mov ecx, dword [rbx + 0x7c]
lea eax, [rcx + 1]
mov dword [rbx + 0x7c], eax
test ecx, ecx
jne 0x1800133fa
mov eax, dword [rbx + 0x58]
test al, 0x40
jne 0x1800133fa
or eax, 0x40
mov dword [rbx + 0x58], eax
test al, 0x20
je 0x1800133fa
mov rax, qword [rbx + 8]
inc dword [rax + 8]
lea rcx, [rsi + 0x10]
lea rax, [rbp + 0x20]
mov qword [rcx], rax
mov rax, qword [rbp + 0x28]
mov qword [rsi + 0x18], rax
mov qword [rax], rcx
mov qword [rbp + 0x28], rcx
inc dword [rbx + 0x78]
inc dword [rbx + 0x100]
test byte [rsp + 0x40], 1
je 0x1800136d6
mov ecx, dword [rbx + 0x58]
mov eax, ecx
and eax, 0x1200000
cmp eax, 0x1200000
jne 0x1800134d5
mov r8d, dword [r14]
lea r9, [rsp + 0x30]
mov rdx, qword [r14 + 8]
mov rcx, qword [rbx + 0x118]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x18001346a
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1800136d8
mov qword [rdi + 0x60], r15
mov ecx, dword [rbx + 0x7c]
lea eax, [rcx + 1]
mov dword [rbx + 0x7c], eax
test ecx, ecx
jne 0x180013493
mov eax, dword [rbx + 0x58]
test al, 0x40
jne 0x180013493
or eax, 0x40
mov dword [rbx + 0x58], eax
test al, 0x20
je 0x180013493
mov rax, qword [rbx + 8]
inc dword [rax + 8]
lea rdx, [rdi + 0x10]
mov r9, r12
lea rax, [rbp + 0x20]
xor r8d, r8d
mov qword [rdx], rax
mov rax, qword [rbp + 0x28]
mov qword [rdi + 0x18], rax
mov qword [rax], rdx
mov qword [rbp + 0x28], rdx
xor edx, edx
inc dword [rbx + 0x78]
inc dword [rbx + 0x100]
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1800136d6
jmp 0x180013723
bt ecx, 0x18
jae 0x180013537
movups xmm0, xmmword [r14]
mov qword [rdi + 0x68], r15
movups xmmword [rdi + 0x90], xmm0
mov rax, qword [rbx + 0x208]
test rax, rax
je 0x18001350b
mov rax, qword [rax + 0x68]
mov qword [rdi + 0x68], rax
mov rax, qword [rbx + 0x208]
mov qword [rax + 0x68], rdi
jmp 0x18001350f
mov qword [rdi + 0x68], rdi
cmp dword [rbx + 0x100], 0
mov qword [rbx + 0x208], rdi
jne 0x180013527
mov rcx, rbx
call fcn.1800131d0
mov eax, dword [r14]
mov qword [rdi + 0x60], rax
add qword [rbx + 0x60], rax
jmp 0x18001368e
xor r9d, r9d
bt ecx, 0x15
jae 0x1800135f3
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rdi + 0x58], rax
test rax, rax
je 0x180013738
mov r8d, dword [r14]
xor r9d, r9d
mov rdx, qword [r14 + 8]
mov rcx, qword [rbx + 0x118]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800135e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x1800135a6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rdi + 0x58]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x1800136d8
mov eax, dword [r14]
or edx, 0xffffffff
mov qword [rdi + 0x60], rax
add qword [rbx + 0x60], rax
mov rcx, qword [rdi + 0x58]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1800135e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rdi + 0x58]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.180011510
jmp 0x1800136d8
mov qword [rdi + 0x60], r15
mov rcx, qword [rdi + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18001368e
mov r8d, dword [r14]
mov rdx, qword [r14 + 8]
mov rcx, qword [rbx + 0x118]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x18001362e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x18001345f
mov eax, dword [r14]
mov qword [rdi + 0x60], rax
add qword [rbx + 0x60], rax
jmp 0x180013632
mov qword [rdi + 0x60], r15
test dword [rbx + 0x58], 0x100000
je 0x18001368e
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rdi + 0xa0], rax
test rax, rax
je 0x18001374d
mov rdx, qword [rdi + 0x58]
lea r8, [0x18000f400]
mov dword [rsp + 0x28], 4
lea rcx, [rdi + 0xa8]
mov r9, rdi
mov dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
je 0x18001345f
mov ecx, dword [rbx + 0x7c]
lea eax, [rcx + 1]
mov dword [rbx + 0x7c], eax
test ecx, ecx
jne 0x1800136b3
mov eax, dword [rbx + 0x58]
test al, 0x40
jne 0x1800136b3
or eax, 0x40
mov dword [rbx + 0x58], eax
test al, 0x20
je 0x1800136b3
mov rax, qword [rbx + 8]
inc dword [rax + 8]
lea rcx, [rdi + 0x10]
lea rax, [rbp + 0x20]
mov qword [rcx], rax
mov rax, qword [rbp + 0x28]
mov qword [rdi + 0x18], rax
mov qword [rax], rcx
mov qword [rbp + 0x28], rcx
inc dword [rbx + 0x78]
inc dword [rbx + 0x100]
xor eax, eax
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.180016f60
add rsp, 0x2e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.CreateEvent
call fcn.180011450
int3
lea rdx, str.uv__malloc
mov ecx, select
call fcn.180011450
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [0x1800604a0]
call fcn.180011450
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.CreateEvent
call fcn.180011450
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.CreateEvent
call fcn.180011450
int3