Function at 0x1400066b0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4a8
mov rsi, rcx
mov rax, qword [0x14012e028]
xor rax, rsp
mov qword [rsp + 0x4a0], rax
lea rax, [0x140113cf0]
mov qword [rcx], rax
lea r14, [rcx + 0x10]
lea rdi, [rcx + 0x18]
lea rbx, [rsp + 0xa0]
mov rcx, rdi
mov rdx, rbx
call fcn.14006c020
movzx r13d, byte [rbx + 0x17]
test r13b, r13b
jns 0x14000670f
mov r13, qword [rsp + 0xa8]
jns 0x14000671e
mov rcx, qword [rsp + 0xa0]
call fcn.14009614c
mov rax, qword [r14]
movsxd rax, dword [rax + 4]
mov rax, qword [r14 + rax + 0x30]
lea rbx, [rsp + 0xa0]
mov qword [rbx], rax
lock inc dword [rax + 8]
lea rdx, [0x14013fac0]
mov rcx, rbx
call fcn.14008c390
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [case.0x1400e3c50.0]
mov ebp, eax
mov rcx, qword [rbx]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
je 0x140006c34
mov rcx, r14
mov edx, ebp
call fcn.140006f80
mov rcx, r14
call fcn.140006e60
movabs rax, 0xaaaaaaaaaaaaaaaa
lea r14, [rsp + 0x70]
mov qword [r14 + 0x10], rax
movaps xmm0, xmmword [0x1401148f0]
movaps xmmword [r14], xmm0
mov rcx, rdi
mov rdx, r14
call fcn.14006c020
movzx eax, byte [r14 + 0x17]
test al, al
js 0x1400067fe
mov r15d, eax
and r15d, 0x7f
jmp 0x140006803
mov qword [rsp + 0x30], rdi
mov rdi, r13
mov r13, r15
or r13, 0xf
inc r13
mov rcx, r13
call fcn.1400961cc
mov r12, rax
mov qword [rsp + 0x58], rax
add rbp, 0x11
or rbp, r13
mov r13, rdi
mov rdi, qword [rsp + 0x30]
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x60], r15
jmp 0x14000685a
mov r15, qword [rsp + 0x78]
mov rcx, qword [rsi + 0x118]
cmp r15, rcx
jb 0x140006c2b
test al, al
jns 0x14000681c
mov r14, qword [rsp + 0x70]
add r14, rcx
sub r15, rcx
js 0x140006c2e
je 0x140006833
test r14, r14
je 0x140006c46
movabs rbp, 0x7fffffffffffffef
cmp r15, rbp
ja 0x140006c31
cmp r15, 0x16
ja 0x1400067c1
lea r12, [rsp + 0x58]
mov byte [r12 + 0x17], r15b
cmp r12, r14
ja 0x14000686c
lea rax, [r12 + r15]
cmp rax, r14
ja 0x140006c49
mov rcx, r12
mov rdx, r14
mov r8, r15
call fcn.140099f10
mov byte [r12 + r15], 0
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x9c], eax
mov qword [rsp + 0x90], rcx
test byte [0x140130400], 0x19
jne 0x140006a05
cmp byte [rsp + 0x6f], 0
jns 0x1400068b9
mov rcx, qword [rsp + 0x58]
call fcn.14009614c
mov eax, dword [rsi + 8]
cmp eax, 3
je 0x140006a37
cmp eax, 2
jge 0x1400069bd
call fcn.1400c6ed0
test al, al
je 0x140006917
lea r9, [rsp + 0xa0]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x70]
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 [0x140140d28]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x140006adf
cmp byte [rsp + 0x87], 0
jns 0x140006935
mov rcx, qword [rsp + 0x70]
call fcn.14009614c
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.140096208
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x140113a08]
mov qword [rsi + rax + 0x10], rcx
lea rax, [0x140113a10]
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x14000697c
mov rcx, qword [rsi + 0x58]
call fcn.14009614c
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.14006bd50
mov rcx, rdi
call fcn.14005d7c0
mov rcx, rsi
call fcn.14006ad30
mov rcx, qword [rsp + 0x4a0]
xor rcx, rsp
call fcn.140098480
nop
add rsp, 0x4a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rbx, [rsp + 0x70]
movzx eax, byte [rbx + 0x17]
mov r14d, eax
and r14d, 0x7f
test al, al
cmovs r14, qword [rbx + 8]
cmovs rbx, qword [rbx]
test r14, r14
je 0x1400068ce
xor r15d, r15d
mov r8d, r14d
sub r8d, r15d
lea rdx, [rbx + r15]
mov ecx, 2
call fcn.140096470
test eax, eax
js 0x1400068ce
jmp 0x140006b9e
lea rax, [rsp + 0x90]
lea rcx, [rsp + 0xa0]
mov qword [rcx], rax
lea rax, [rsp + 0x9c]
mov qword [rcx + 8], rax
lea rax, [rsp + 0x58]
mov qword [rcx + 0x10], rax
call fcn.1400e52c0
jmp 0x1400068a8
mov eax, 3
cmp byte [0x140140d54], 0
jne 0x1400068c5
mov byte [0x140140d54], 1
mov eax, dword [0x140140d60]
mov ecx, dword [0x14013da54]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140006c4c
mov rcx, rsi
mov rdx, rbx
call fcn.1400e4ef0
movzx eax, byte [rsp + 0xb7]
mov ecx, eax
and ecx, 0x7f
test al, al
cmovs rbx, qword [rsp + 0xa0]
cmovs rcx, qword [rsp + 0xa8]
lea rdx, [rsp + 0x58]
mov qword [rdx], rbx
mov qword [rdx + 8], rcx
mov rcx, qword [0x140140d58]
call fcn.1400046a0
cmp byte [rsp + 0xb7], 0
jns 0x140006ad0
mov rcx, qword [rsp + 0xa0]
call fcn.14009614c
mov byte [0x140140d54], 0
mov eax, dword [rsi + 8]
jmp 0x1400068c5
lea rbx, [rsp + 0xa0]
mov r8d, 0x400
mov rcx, rbx
mov dl, 0xaa
call fcn.14009a5c0
cmp byte [rsp + 0x87], 0
jns 0x140006b08
mov rdx, qword [rsp + 0x70]
jmp 0x140006b0d
lea rdx, [rsp + 0x70]
mov r8d, 0x400
mov rcx, rbx
call fcn.1400958d0
mov rcx, rbx
call fcn.14005d7c0
call fcn.1400e4e10
mov rax, qword [0x140140d40]
cmp rax, qword [0x140140d48]
je 0x140006c8e
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x58], rax
call fcn.1400e4e10
mov rdx, qword [0x140140d48]
test rdx, rdx
mov rax, qword [0x140140d38]
cmove rdx, rax
dec rdx
cmp rax, rdx
jb 0x140006c91
shl rdx, 3
add rdx, qword [0x140140d30]
lea rbx, [rsp + 0x58]
mov rcx, rbx
call fcn.140095990
cmp qword [rbx], 0
jne 0x140006bb1
lea rcx, [rsp + 0x58]
call fcn.1400959c0
jmp 0x140006921
mov eax, eax
add r15, rax
cmp r14, r15
ja 0x1400069e4
jmp 0x1400068ce
cmp byte [rsp + 0x87], 0
js 0x140006bc2
lea rbx, [rsp + 0x70]
jmp 0x140006bc7
mov rbx, qword [rsp + 0x70]
mov rcx, rbx
add rcx, r13
mov qword [rsp + 0x48], rcx
je 0x140006c94
call fcn.1400b2e30
mov qword [rsp + 0x50], rax
mov rax, qword [rsi + 0x118]
add rbx, rax
mov qword [rsp + 0x38], rbx
sub r13, rax
mov qword [rsp + 0x40], r13
js 0x140006c97
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x58]
lea r9, [rsp + 0x38]
call fcn.1400e4e80
jmp 0x140006b8f
int3
int3
int3
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x1400e3c50.0]
jmp 0x140006774
int3
int3
lea rcx, [0x140140d60]
call fcn.140096228
cmp dword [0x140140d60], 0xffffffff
jne 0x140006a75
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.140006f70
mov qword [0x140140d58], rax
lea rcx, [0x140140d60]
call fcn.140096508
jmp 0x140006a75
int3
int3
int3
int3