Function at 0x140003260
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov rsi, rcx
mov eax, dword [rcx + 0x78]
movabs r13, 0x7ffffffffffffff8
test al, 0x10
je 0x140003613
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x14000329f
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x1400035bf
cmp rdi, r13
jae 0x1400035c2
cmp rdi, 0x16
ja 0x140003532
lea rcx, [rsp + 0x48]
mov byte [rcx + 0x17], dil
lea r15, [rcx + rdi]
cmp rcx, rbx
ja 0x1400032da
cmp r15, rbx
ja 0x1400035d4
test rdi, rdi
je 0x1400032ea
mov rdx, rbx
mov r8, rdi
call fcn.1400a3450
lea r14, [rsi + 0x10]
mov byte [r15], 0
movzx edi, byte [rsp + 0x5f]
test dil, dil
jns 0x140003301
mov rdi, qword [rsp + 0x50]
jns 0x14000330d
mov rcx, qword [rsp + 0x48]
call fcn.14009f888
mov rax, qword [r14]
movsxd rax, dword [rax + 4]
mov rax, qword [r14 + rax + 0x30]
mov qword [rsp + 0x48], rax
lea r15, [0x140149af0]
cmp rax, r15
jne 0x1400035c5
lea rdx, [0x14014a7f0]
lea rbx, [rsp + 0x48]
mov rcx, rbx
call fcn.1400918c0
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x14012df48]
mov ebp, eax
mov rcx, qword [rbx]
cmp rcx, r15
jne 0x1400035ef
mov rcx, r14
mov edx, ebp
call fcn.1400038c0
mov rcx, r14
call fcn.1400037a0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
movaps xmm0, xmmword [0x140118af0]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
je 0x140003636
mov rax, qword [rsi + 0x48]
mov r14, qword [rsi + 0x70]
cmp r14, rax
jae 0x1400033b1
mov qword [rsi + 0x70], rax
mov r14, rax
mov r15, qword [rsi + 0x40]
sub r14, r15
js 0x1400035ce
cmp r14, r13
jae 0x1400035d1
cmp r14, 0x16
ja 0x1400034f5
lea rcx, [rsp + 0x30]
mov byte [rcx + 0x17], r14b
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x1400033ec
cmp r12, r15
ja 0x1400035d7
test r14, r14
je 0x1400033fc
mov rdx, r15
mov r8, r14
call fcn.1400a3450
mov byte [r12], 0
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], rbx
lea r15, [rsp + 0x68]
lea r14, [rsp + 0x30]
mov rcx, r15
mov rdx, r14
mov r9, 0xffffffffffffffff
call fcn.140012910
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x64], eax
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x80], 0x56
mov al, byte [0x14014a876]
test al, al
jne 0x140003706
cmp byte [rsp + 0x7f], 0
jns 0x14000346d
mov rcx, qword [rsp + 0x68]
call fcn.14009f888
mov eax, dword [rsi + 8]
cmp eax, 3
je 0x14000365b
cmp eax, 2
jge 0x140003572
call fcn.1400d29f0
test al, al
je 0x1400034c5
lea r9, [rsp + 0x48]
mov dword [r9], 0xaaaaaaaa
movzx r8d, byte [rsp + 0x47]
test r8b, r8b
cmovs r8d, dword [rsp + 0x38]
cmovs r14, qword [rsp + 0x30]
mov rcx, qword [0x14014aa60]
mov qword [rsp + 0x20], 0
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x1400035da
cmp byte [rsp + 0x47], 0
jns 0x1400034e0
mov rcx, qword [rsp + 0x30]
call fcn.14009f888
nop
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
and r13, r14
add r13, 8
mov r12, r14
or r12, 7
cmp r12, 0x17
cmove r12, r13
inc r12
mov rcx, r12
call fcn.14009f7f4
mov rcx, rax
mov qword [rsp + 0x30], rax
bts r12, 0x3f
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
jmp 0x1400033da
mov rax, rdi
and rax, r13
add rax, 8
mov r14, rdi
or r14, 7
cmp r14, 0x17
cmove r14, rax
inc r14
mov rcx, r14
call fcn.14009f7f4
mov rcx, rax
mov qword [rsp + 0x48], rax
bts r14, 0x3f
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], rdi
jmp 0x1400032c8
movzx ebx, byte [rsp + 0x47]
test bl, bl
cmovs rbx, qword [rsp + 0x38]
mov r15, qword [rsp + 0x30]
cmovns r15, r14
test rbx, rbx
je 0x140003482
xor r12d, r12d
mov r8d, ebx
sub r8d, r12d
lea rdx, [r15 + r12]
mov ecx, 2
call fcn.14009f978
test eax, eax
js 0x140003482
mov eax, eax
add r12, rax
cmp r12, rbx
jb 0x140003594
jmp 0x140003482
int3
int3
lock inc dword [rax + 8]
jmp 0x14000332e
int3
int3
int3
int3
lea r8, [rsp + 0x30]
mov rcx, rsi
mov rdx, rdi
call fcn.1400ef2a0
jmp 0x1400034cf
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
jne 0x140003365
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x14012df48]
jmp 0x140003365
xor ebx, ebx
mov edi, 0
test al, 8
je 0x1400032bf
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
sub rdi, rbx
jns 0x1400032ac
int3
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x1400033d1
mov r15, qword [rsi + 0x28]
mov r14, qword [rsi + 0x38]
sub r14, r15
jns 0x1400033be
int3
mov eax, 3
cmp byte [0x14014aa8c], 0
jne 0x140003479
mov byte [0x14014aa8c], 1
mov eax, dword [0x14014aa98]
mov ecx, dword [0x140147910]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000374a
mov rcx, rsi
mov rdx, rbx
call fcn.1400ef1d0
movzx eax, byte [rsp + 0x5f]
test al, al
jns 0x1400036b7
mov rax, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rax
test rax, rax
js 0x14000378c
je 0x1400036d5
test rbx, rbx
je 0x14000378f
mov rcx, qword [0x14014aa90]
lea rdx, [rsp + 0x68]
call fcn.1400039e0
cmp byte [rsp + 0x5f], 0
jns 0x1400036f7
mov rcx, qword [rsp + 0x48]
call fcn.14009f888
mov byte [0x14014aa8c], 0
mov eax, dword [rsi + 8]
jmp 0x140003479
movzx ecx, al
lea rax, [rsp + 0x88]
lea r9, [rsp + 0x48]
mov qword [r9], rax
lea rax, [rsp + 0x64]
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], r15
lea rax, str.LogMessage
lea r8, [rsp + 0x90]
mov qword [r8], rax
lea rdx, [rsp + 0x80]
call fcn.1400ef880
jmp 0x14000345c
lea rcx, [0x14014aa98]
call fcn.14009f910
cmp dword [0x14014aa98], 0xffffffff
jne 0x140003699
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.1400038b0
mov qword [0x14014aa90], rax
lea rcx, [0x14014aa98]
call fcn.14009f8b0
jmp 0x140003699
int3
int3