Function at 0x1400b2920
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rsp + 0xb0], rbx
mov rbx, rcx
xor eax, eax
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rax + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp - 0x10], rax
mov edi, 2
lea rcx, [rbx + 0x20]
call fcn.140040f80
mov rax, qword [rbx + 0x10]
cmp dword [rax + 4], 0
jne 0x1400b29b6
movzx eax, byte [rbx + 0x30]
test al, al
jne 0x1400b29b1
lea rcx, [rbx + 0x18]
call fcn.1400aab40
or r8d, 0xffffffff
lea rdx, [rbx + 0x20]
lea rcx, [rbx + 0x18]
call fcn.1400aa980
mov rax, qword [rbx + 0x10]
cmp dword [rax + 4], 0
je 0x1400b2985
mov edi, 2
movzx eax, byte [rbx + 0x30]
test al, al
jne 0x1400b2b76
mov rax, qword [rbx + 0x10]
mov qword [rbp + 0x48], rax
mov ecx, dword [rax]
inc ecx
cmp ecx, 1
jbe 0x1400b29d6
lock inc dword [rax]
lea rcx, [rbx + 0x20]
call fcn.140041490
mov rax, qword [rbp + 0x48]
mov ecx, dword [rax]
cmp ecx, 1
ja 0x1400b29f1
cmp qword [rax + 0x10], 0x18
je 0x1400b2a19
xor r8d, r8d
test ecx, ecx
cmove r8d, edi
test dword [rax + 8], 0x80000000
je 0x1400b2a07
or r8d, 1
mov edx, dword [rax + 4]
inc edx
lea rcx, [rbp + 0x48]
call fcn.14002a4b0
mov rax, qword [rbp + 0x48]
mov r12, qword [rax + 0x10]
add r12, rax
movsxd r14, dword [rax + 4]
xor ecx, ecx
mov edi, ecx
mov qword [rbp - 0x18], rcx
movzx eax, byte [rbx + 0x30]
test al, al
jne 0x1400b2af7
nop dword [rax + rax]
cmp rdi, r14
jge 0x1400b2af7
mov dword [rbp + 0x40], ecx
mov r8d, r14d
sub r8d, edi
lea rdx, [rdi + r12]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x40]
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400b2abb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe8
jne 0x1400b2a8a
mov ecx, WSAAsyncSelect
call sub.KERNEL32.dll_Sleep
jmp 0x1400b2ae6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400b2b43
mov r9d, 1
lea r8, [rbp + 0x40]
lea rdx, [rbp - 0x28]
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1400b2b43
mov eax, dword [rbp + 0x40]
add rdi, rax
lea rcx, [rbx + 0x20]
call fcn.140040f80
mov r8d, dword [rbp + 0x40]
xor edx, edx
lea rcx, [rbx + 0x10]
call fcn.14002a5f0
mov byte [rbx + 0x31], 1
lea rcx, [rbx + 0x20]
call fcn.140041490
movzx eax, byte [rbx + 0x30]
test al, al
mov ecx, 0
je 0x1400b2a40
mov rdx, rdi
mov rcx, rbx
call fcn.1400c6df0
mov rcx, rbx
call fcn.1400c6e30
nop
mov rcx, qword [rbp + 0x48]
mov eax, dword [rcx]
test eax, eax
je 0x1400b2b30
cmp eax, 0xffffffff
mov edi, 2
je 0x1400b2972
lock dec dword [rcx]
jne 0x1400b2972
mov rcx, qword [rbp + 0x48]
mov edx, 1
lea r8d, [rdx + 7]
call fcn.1400112a0
jmp 0x1400b296d
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rbp + 0x48]
mov eax, dword [rcx]
test eax, eax
je 0x1400b2b66
cmp eax, 0xffffffff
je 0x1400b2b8d
lock dec dword [rcx]
jne 0x1400b2b8d
mov rcx, qword [rbp + 0x48]
mov edx, 1
lea r8d, [rdx + 7]
call fcn.1400112a0
jmp 0x1400b2b8d
lea rcx, [rbx + 0x20]
call fcn.140041490
mov byte [rbx + 0x30], 0
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0xb0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret