Function at 0x140004bc0
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 [0x14012f028]
xor rax, rsp
mov qword [rsp + 0x4a0], rax
movabs r13, 0x7ffffffffffffff7
lea rax, [0x140114080]
mov qword [rcx], rax
mov eax, dword [rcx + 0x78]
test al, 0x10
je 0x140005175
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x140004c1b
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x140005151
cmp rdi, r13
ja 0x140005154
cmp rdi, 0x16
ja 0x140004f40
lea rcx, [rsp + 0xa0]
mov byte [rcx + 0x17], dil
lea r15, [rcx + rdi]
cmp rcx, rbx
ja 0x140004c59
cmp r15, rbx
ja 0x14000516f
test rdi, rdi
je 0x140004c69
mov rdx, rbx
mov r8, rdi
call fcn.140097a10
lea r14, [rsi + 0x10]
lea rdi, [rsi + 0x18]
mov byte [r15], 0
movzx r12d, byte [rsp + 0xb7]
test r12b, r12b
jns 0x140004c8b
mov r12, qword [rsp + 0xa8]
jns 0x140004c9a
mov rcx, qword [rsp + 0xa0]
call fcn.140093dd0
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, [0x140146fb8]
mov rcx, rbx
call fcn.140087ab0
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x140152008]
mov ebp, eax
mov rcx, qword [rbx]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
je 0x14000515d
mov rcx, r14
mov edx, ebp
call fcn.1400054e0
mov rcx, r14
call fcn.1400053c0
movabs rbp, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x80], rbp
movaps xmm0, xmmword [0x140114ca0]
movaps xmmword [rsp + 0x70], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
mov qword [rsp + 0x30], r12
je 0x140005198
mov rax, qword [rsi + 0x48]
mov r14, qword [rsi + 0x70]
cmp r14, rax
jae 0x140004d44
mov qword [rsi + 0x70], rax
mov r14, rax
mov r15, qword [rsi + 0x40]
sub r14, r15
js 0x140005157
cmp r14, r13
ja 0x14000515a
cmp r14, 0x16
ja 0x140004efa
lea rcx, [rsp + 0x70]
mov byte [rcx + 0x17], r14b
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x140004d7f
cmp r12, r15
ja 0x140005172
test r14, r14
je 0x140004d8f
mov rdx, r15
mov r8, r14
call fcn.140097a10
mov byte [r12], 0
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], rbx
lea r15, [rsp + 0x58]
lea r14, [rsp + 0x70]
mov rcx, r15
mov rdx, r14
mov r9, 0xffffffffffffffff
call fcn.140010fe0
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x9c], eax
mov qword [rsp + 0x90], rcx
test byte [0x14013d5a0], 0x19
jne 0x140004fd4
cmp byte [rsp + 0x6f], 0
jns 0x140004df6
mov rcx, qword [rsp + 0x58]
call fcn.140093dd0
mov eax, dword [rsi + 8]
cmp eax, 3
je 0x1400051f8
cmp eax, 2
jge 0x140004f8c
call fcn.1400c7390
test al, al
je 0x140004e54
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 [0x140147480]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x140005001
cmp byte [rsp + 0x87], 0
jns 0x140004e72
mov rcx, qword [rsp + 0x70]
call fcn.140093dd0
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.140093e50
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x140113b18]
mov qword [rsi + rax + 0x10], rcx
lea rax, str.P2_r_
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x140004eb9
mov rcx, qword [rsi + 0x58]
call fcn.140093dd0
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.140065d30
mov rcx, rdi
call fcn.140057b20
mov rcx, rsi
call fcn.140064be0
mov rcx, qword [rsp + 0x4a0]
xor rcx, rsp
call fcn.140095f80
nop
add rsp, 0x4a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [r13 + 1]
and rax, r14
add rax, 8
mov r12, r14
or r12, 7
cmp r12, 0x17
cmove r12, rax
inc r12
mov rcx, r12
call fcn.140093d8c
mov rcx, rax
mov qword [rsp + 0x70], rax
add r13, 9
or r13, r12
mov qword [rsp + 0x80], r13
mov qword [rsp + 0x78], r14
jmp 0x140004d6d
lea rax, [r13 + 1]
and rax, rdi
add rax, 8
mov r14, rdi
or r14, 7
cmp r14, 0x17
cmove r14, rax
inc r14
mov rcx, r14
call fcn.140093d8c
mov rcx, rax
mov qword [rsp + 0xa0], rax
lea rax, [r13 + 9]
or rax, r14
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xa8], rdi
jmp 0x140004c47
lea rbx, [rsp + 0x70]
movzx eax, byte [rbx + 0x17]
mov r15d, eax
and r15d, 0x7f
test al, al
cmovs r15, qword [rbx + 8]
cmovs rbx, qword [rbx]
test r15, r15
je 0x140004e0b
xor r12d, r12d
mov r8d, r15d
sub r8d, r12d
lea rdx, [rbx + r12]
mov ecx, 2
call fcn.140093e78
test eax, eax
js 0x140004e0b
jmp 0x1400050b2
lea rax, [rsp + 0x90]
lea rcx, [rsp + 0xa0]
mov qword [rcx], rax
lea rax, [rsp + 0x9c]
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], r15
call fcn.1400eedf0
jmp 0x140004de5
lea rbx, [rsp + 0xa0]
mov r8d, 0x400
mov rcx, rbx
mov dl, 0xaa
call fcn.1400980c0
cmp byte [rsp + 0x87], 0
jns 0x140005028
mov r14, qword [rsp + 0x70]
mov r8d, 0x400
mov rcx, rbx
mov rdx, r14
call fcn.140093310
mov rcx, rbx
call fcn.140057b20
call fcn.1400ee940
mov rax, qword [0x140147498]
cmp rax, qword [0x1401474a0]
je 0x1400052ae
mov qword [rsp + 0x58], rbp
call fcn.1400ee940
mov rdx, qword [0x1401474a0]
test rdx, rdx
mov rax, qword [0x140147490]
cmove rdx, rax
dec rdx
cmp rax, rdx
jb 0x1400052b1
shl rdx, 3
add rdx, qword [0x140147488]
lea rbx, [rsp + 0x58]
mov rcx, rbx
call fcn.1400934f0
cmp qword [rbx], 0
jne 0x1400050c5
lea rcx, [rsp + 0x58]
call fcn.140093520
jmp 0x140004e5e
mov eax, eax
add r12, rax
cmp r12, r15
jb 0x140004fb3
jmp 0x140004e0b
cmp byte [rsp + 0x87], 0
js 0x1400050d6
lea rbx, [rsp + 0x70]
jmp 0x1400050db
mov rbx, qword [rsp + 0x70]
mov rcx, rbx
add rcx, qword [rsp + 0x30]
mov qword [rsp + 0x48], rcx
je 0x1400052ba
call fcn.1400b04b0
mov qword [rsp + 0x50], rax
mov rax, qword [rsi + 0x118]
add rbx, rax
mov qword [rsp + 0x38], rbx
mov rcx, qword [rsp + 0x30]
sub rcx, rax
mov qword [rsp + 0x40], rcx
js 0x1400052bd
je 0x140005125
test rbx, rbx
je 0x1400052c0
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.1400ee9b0
jmp 0x1400050a3
int3
int3
int3
int3
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140152008]
jmp 0x140004cf0
int3
int3
xor ebx, ebx
mov edi, 0
test al, 8
je 0x140004c3b
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
sub rdi, rbx
jns 0x140004c28
int3
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x140004d64
mov r15, qword [rsi + 0x28]
mov r14, qword [rsi + 0x38]
sub r14, r15
jns 0x140004d51
int3
lea rcx, [0x1401474b8]
call fcn.140093f10
cmp dword [0x1401474b8], 0xffffffff
jne 0x140005232
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.1400054d0
mov qword [0x1401474b0], rax
lea rcx, [0x1401474b8]
call fcn.140093f78
jmp 0x140005232
mov eax, 3
cmp byte [0x1401474ac], 0
jne 0x140004e02
mov byte [0x1401474ac], 1
mov eax, dword [0x1401474b8]
mov ecx, dword [0x14013e9b0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400051bd
mov rcx, rsi
mov rdx, rbx
call fcn.1400eea10
movzx eax, byte [rsp + 0xb7]
test al, al
js 0x14000524e
and eax, 0x7f
jmp 0x14000525e
mov rax, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rax
test rax, rax
js 0x1400052b4
test rbx, rbx
jne 0x140005277
test rax, rax
jne 0x1400052b7
mov rcx, qword [0x1401474b0]
lea rdx, [rsp + 0x58]
call fcn.140004b10
cmp byte [rsp + 0xb7], 0
jns 0x14000529f
mov rcx, qword [rsp + 0xa0]
call fcn.140093dd0
mov byte [0x1401474ac], 0
mov eax, dword [rsi + 8]
jmp 0x140004e02
int3
int3
int3
int3
int3
int3
int3