Function at 0x140007290
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x498
mov rsi, rcx
mov rax, qword [0x140135028]
xor rax, rsp
mov qword [rsp + 0x490], rax
lea rax, [0x14011af78]
mov qword [rcx], rax
lea rbx, [rcx + 0x10]
lea rdi, [rcx + 0x18]
lea r14, [rsp + 0x90]
mov rcx, rdi
mov rdx, r14
call fcn.14006e160
movzx r12d, byte [r14 + 0x17]
test r12b, r12b
jns 0x1400072ef
mov r12, qword [rsp + 0x98]
jns 0x1400072fe
mov rcx, qword [rsp + 0x90]
call fcn.14009b57c
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
mov rax, qword [rbx + rax + 0x30]
lea r14, [rsp + 0x90]
mov qword [r14], rax
lock inc dword [rax + 8]
lea rdx, [0x14014c558]
mov rcx, r14
call fcn.140090db0
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x140159008]
mov ebp, eax
mov rcx, qword [r14]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
je 0x140007534
mov rcx, rbx
mov edx, ebp
call fcn.1400079e0
mov rcx, rbx
call fcn.1400078c0
movabs r13, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x60]
mov qword [rbx + 0x10], r13
movaps xmm0, xmmword [0x14011bbd0]
movaps xmmword [rbx], xmm0
mov rcx, rdi
mov rdx, rbx
call fcn.14006e160
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], r14
lea r15, [rsp + 0x48]
mov rcx, r15
mov rdx, rbx
mov r9, 0xffffffffffffffff
call fcn.140012c60
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x8c], eax
mov qword [rsp + 0x80], rcx
test byte [0x140143500], 0x19
jne 0x140007546
cmp byte [rsp + 0x5f], 0
jns 0x1400073eb
mov rcx, qword [rsp + 0x48]
call fcn.14009b57c
mov eax, dword [rsi + 8]
cmp eax, 3
je 0x140007573
cmp eax, 2
jge 0x1400074ec
call fcn.1400cdc90
test al, al
je 0x140007449
lea r9, [rsp + 0x90]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x60]
movzx eax, byte [rdx + 0x17]
mov r8d, eax
and r8d, 0x7f
test al, al
cmovs r8d, dword [rdx + 8]
cmovs rdx, qword [rdx]
mov rcx, qword [0x14014d7b0]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x140007635
cmp byte [rsp + 0x77], 0
jns 0x140007464
mov rcx, qword [rsp + 0x60]
call fcn.14009b57c
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.14009b700
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, str.__r_r_
mov qword [rsi + rax + 0x10], rcx
lea rax, [0x14011ab50]
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x1400074ab
mov rcx, qword [rsi + 0x58]
call fcn.14009b57c
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.14006df30
mov rcx, rdi
call fcn.14005e780
mov rcx, rsi
call fcn.14006cdb0
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.14009d810
nop
add rsp, 0x498
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r14, [rsp + 0x60]
movzx eax, byte [r14 + 0x17]
mov r15d, eax
and r15d, 0x7f
test al, al
cmovs r15, qword [r14 + 8]
cmovs r14, qword [r14]
test r15, r15
je 0x140007400
xor ebp, ebp
mov r8d, r15d
sub r8d, ebp
lea rdx, [r14 + rbp]
mov ecx, 2
call fcn.14009b734
test eax, eax
js 0x140007400
jmp 0x1400076e3
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140159008]
jmp 0x140007354
lea rax, [rsp + 0x80]
lea rcx, [rsp + 0x90]
mov qword [rcx], rax
lea rax, [rsp + 0x8c]
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], r15
call fcn.1400f4bc0
jmp 0x1400073da
mov eax, 3
cmp byte [0x14014d7dc], 0
jne 0x1400073f7
mov byte [0x14014d7dc], 1
mov eax, dword [0x14014d7e8]
mov ecx, dword [0x140144910]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140007778
mov rcx, rsi
mov rdx, r14
call fcn.1400f47f0
movzx eax, byte [rsp + 0xa7]
test al, al
js 0x1400075cd
and eax, 0x7f
jmp 0x1400075dd
mov rax, qword [rsp + 0x98]
mov r14, qword [rsp + 0x90]
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], rax
test rax, rax
js 0x1400077c0
test r14, r14
jne 0x1400075fe
test rax, rax
jne 0x1400077c9
mov rcx, qword [0x14014d7e0]
lea rdx, [rsp + 0x48]
call fcn.140005420
cmp byte [rsp + 0xa7], 0
jns 0x140007626
mov rcx, qword [rsp + 0x90]
call fcn.14009b57c
mov byte [0x14014d7dc], 0
mov eax, dword [rsi + 8]
jmp 0x1400073f7
lea r14, [rsp + 0x90]
mov r8d, 0x400
mov rcx, r14
mov dl, 0xaa
call fcn.14009f950
cmp byte [rsp + 0x77], 0
jns 0x140007659
mov rbx, qword [rsp + 0x60]
mov r8d, 0x400
mov rcx, r14
mov rdx, rbx
call fcn.14009acf0
mov rcx, r14
call fcn.14005e780
call fcn.1400f4710
mov rax, qword [0x14014d7c8]
cmp rax, qword [0x14014d7d0]
je 0x1400077ba
mov qword [rsp + 0x48], r13
call fcn.1400f4710
mov rdx, qword [0x14014d7d0]
test rdx, rdx
mov rax, qword [0x14014d7c0]
cmove rdx, rax
dec rdx
cmp rax, rdx
jb 0x1400077bd
shl rdx, 3
add rdx, qword [0x14014d7b8]
lea rbx, [rsp + 0x48]
mov rcx, rbx
call fcn.14009ae70
cmp qword [rbx], 0
jne 0x1400076f6
lea rcx, [rsp + 0x48]
call fcn.14009aea0
jmp 0x140007453
mov eax, eax
add rbp, rax
cmp rbp, r15
jb 0x140007513
jmp 0x140007400
cmp byte [rsp + 0x77], 0
js 0x140007704
lea rbx, [rsp + 0x60]
jmp 0x140007709
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
add rcx, r12
mov qword [rsp + 0x38], rcx
je 0x1400077c3
call fcn.1400b8bc0
mov qword [rsp + 0x40], rax
mov rax, qword [rsi + 0x118]
add rbx, rax
mov qword [rsp + 0x28], rbx
sub r12, rax
mov qword [rsp + 0x30], r12
js 0x1400077c6
je 0x14000774c
test rbx, rbx
je 0x1400077cc
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x48]
lea r9, [rsp + 0x28]
call fcn.1400f4780
jmp 0x1400076d4
lea rcx, [0x14014d7e8]
call fcn.14009b5e4
cmp dword [0x14014d7e8], 0xffffffff
jne 0x1400075b1
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.1400079d0
mov qword [0x14014d7e0], rax
lea rcx, [0x14014d7e8]
call fcn.14009b584
jmp 0x1400075b1
int3
int3
int3
int3
int3
int3
int3