Function at 0x140002390
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4b8
mov rsi, rcx
lea rax, [0x14011d4b8]
mov qword [rcx], rax
mov eax, dword [rcx + 0x78]
movabs r13, 0x7ffffffffffffff8
test al, 0x10
je 0x1400027c8
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x1400023d9
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x140002789
cmp rdi, r13
jae 0x14000278c
cmp rdi, 0x16
ja 0x1400026ee
lea rcx, [rsp + 0xb0]
mov byte [rcx + 0x17], dil
lea r15, [rcx + rdi]
cmp rcx, rbx
ja 0x140002417
cmp r15, rbx
ja 0x14000279e
test rdi, rdi
je 0x140002427
mov rdx, rbx
mov r8, rdi
call fcn.1400a3a80
lea r14, [rsi + 0x10]
lea rdi, [rsi + 0x18]
mov byte [r15], 0
movzx r12d, byte [rsp + 0xc7]
test r12b, r12b
jns 0x140002449
mov r12, qword [rsp + 0xb8]
jns 0x140002458
mov rcx, qword [rsp + 0xb0]
call fcn.14009fde8
mov rax, qword [r14]
movsxd rax, dword [rax + 4]
mov rax, qword [r14 + rax + 0x30]
mov qword [rsp + 0xb0], rax
lea r15, [0x14014baf0]
cmp rax, r15
jne 0x14000278f
lea rdx, [0x14014c7f0]
lea rbx, [rsp + 0xb0]
mov rcx, rbx
call fcn.140093430
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x140163008]
mov ebp, eax
mov rcx, qword [rbx]
cmp rcx, r15
jne 0x1400027a4
mov rcx, r14
mov edx, ebp
call fcn.140002da0
mov rcx, r14
call fcn.140002c80
movabs rbp, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rbp
movaps xmm0, xmmword [0x14011bb10]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
mov qword [rsp + 0x70], r12
je 0x1400027eb
mov rax, qword [rsi + 0x48]
mov r14, qword [rsi + 0x70]
cmp r14, rax
jae 0x140002507
mov qword [rsi + 0x70], rax
mov r14, rax
mov r15, qword [rsi + 0x40]
sub r14, r15
js 0x140002798
cmp r14, r13
jae 0x14000279b
cmp r14, 0x16
ja 0x1400026b1
lea rcx, [rsp + 0x30]
mov byte [rcx + 0x17], r14b
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x140002542
cmp r12, r15
ja 0x1400027a1
test r14, r14
je 0x140002552
mov rdx, r15
mov r8, r14
call fcn.1400a3a80
mov byte [r12], 0
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], rbx
lea r15, [rsp + 0x58]
lea r14, [rsp + 0x30]
mov rcx, r15
mov rdx, r14
mov r9, 0xffffffffffffffff
call fcn.140014260
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x54], eax
mov qword [rsp + 0x80], rcx
mov qword [rsp + 0x78], 0x56
mov al, byte [0x14014c876]
test al, al
jne 0x140002a1b
cmp byte [rsp + 0x6f], 0
jns 0x1400025c0
mov rcx, qword [rsp + 0x58]
call fcn.14009fde8
mov eax, dword [rsi + 8]
cmp eax, 3
je 0x140002810
cmp eax, 2
jge 0x140002737
call fcn.1400d2fb0
test al, al
je 0x14000261e
lea r9, [rsp + 0xb0]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x30]
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 [0x14014ca60]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x1400028d2
cmp byte [rsp + 0x47], 0
jns 0x140002639
mov rcx, qword [rsp + 0x30]
call fcn.14009fde8
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.14009fdf0
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, str._i_r_
mov qword [rsi + rax + 0x10], rcx
lea rax, str._j_r_
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x140002680
mov rcx, qword [rsi + 0x58]
call fcn.14009fde8
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.140065880
mov rcx, rdi
call fcn.14005a1d0
mov rcx, rsi
call fcn.1400647c0
nop
add rsp, 0x4b8
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.14009fd48
mov rcx, rax
mov qword [rsp + 0x30], rax
bts r12, 0x3f
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
jmp 0x140002530
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.14009fd48
mov rcx, rax
mov qword [rsp + 0xb0], rax
bts r14, 0x3f
mov qword [rsp + 0xc0], r14
mov qword [rsp + 0xb8], rdi
jmp 0x140002405
lea rbx, [rsp + 0x30]
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 0x1400025d5
xor r12d, r12d
mov r8d, r15d
sub r8d, r12d
lea rdx, [rbx + r12]
mov ecx, 2
call fcn.14009fe78
test eax, eax
js 0x1400025d5
mov eax, eax
add r12, rax
cmp r12, r15
jb 0x14000275e
jmp 0x1400025d5
int3
int3
lock inc dword [rax + 8]
jmp 0x14000247c
int3
int3
int3
int3
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
jne 0x1400024b6
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140163008]
jmp 0x1400024b6
xor ebx, ebx
mov edi, 0
test al, 8
je 0x1400023f9
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
sub rdi, rbx
jns 0x1400023e6
int3
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x140002527
mov r15, qword [rsi + 0x28]
mov r14, qword [rsi + 0x38]
sub r14, r15
jns 0x140002514
int3
mov eax, 3
cmp byte [0x14014ca8c], 0
jne 0x1400025cc
mov byte [0x14014ca8c], 1
mov eax, dword [0x14014ca98]
mov ecx, dword [0x140149910]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140002a5f
mov rcx, rsi
mov rdx, rbx
call fcn.1400f07f0
movzx eax, byte [rsp + 0xc7]
test al, al
js 0x14000286a
and eax, 0x7f
jmp 0x14000287a
mov rax, qword [rsp + 0xb8]
mov rbx, qword [rsp + 0xb0]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rax
test rax, rax
js 0x140002aa7
test rbx, rbx
jne 0x14000289b
test rax, rax
jne 0x140002aaa
mov rcx, qword [0x14014ca90]
lea rdx, [rsp + 0x58]
call fcn.140001e40
cmp byte [rsp + 0xc7], 0
jns 0x1400028c3
mov rcx, qword [rsp + 0xb0]
call fcn.14009fde8
mov byte [0x14014ca8c], 0
mov eax, dword [rsi + 8]
jmp 0x1400025cc
lea rbx, [rsp + 0xb0]
mov r8d, 0x400
mov rcx, rbx
mov dl, 0xaa
call fcn.1400a4130
cmp byte [rsp + 0x47], 0
jns 0x1400028f6
mov r14, qword [rsp + 0x30]
mov r8d, 0x400
mov rcx, rbx
mov rdx, r14
call fcn.14009ed20
mov rcx, rbx
call fcn.14005a1d0
call fcn.1400f0720
mov rax, qword [0x14014ca78]
cmp rax, qword [0x14014ca80]
je 0x140002aa1
mov qword [rsp + 0x58], rbp
call fcn.1400f0720
mov rdx, qword [0x14014ca80]
test rdx, rdx
mov rax, qword [0x14014ca70]
cmove rdx, rax
dec rdx
cmp rax, rdx
jb 0x140002aa4
shl rdx, 3
add rdx, qword [0x14014ca68]
lea rbx, [rsp + 0x58]
mov rcx, rbx
call fcn.14009eff0
cmp qword [rbx], 0
jne 0x140002980
lea rcx, [rsp + 0x58]
call fcn.14009f020
jmp 0x140002628
cmp byte [rsp + 0x47], 0
js 0x14000298e
lea rbx, [rsp + 0x30]
jmp 0x140002993
mov rbx, qword [rsp + 0x30]
mov rcx, rbx
add rcx, qword [rsp + 0x70]
mov qword [rsp + 0x98], rcx
je 0x140002aad
call fcn.1400bc460
mov qword [rsp + 0xa0], rax
mov rax, qword [rsi + 0x118]
add rbx, rax
mov qword [rsp + 0x88], rbx
mov rcx, qword [rsp + 0x70]
sub rcx, rax
mov qword [rsp + 0x90], rcx
js 0x140002ab0
je 0x1400029e9
test rbx, rbx
je 0x140002ab3
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x58]
lea r9, [rsp + 0x88]
call fcn.1400f0790
jmp 0x140002971
movzx ecx, al
lea rax, [rsp + 0x80]
lea r9, [rsp + 0xb0]
mov qword [r9], rax
lea rax, [rsp + 0x54]
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], r15
lea rax, str.LogMessage
lea r8, [rsp + 0xa8]
mov qword [r8], rax
lea rdx, [rsp + 0x78]
call fcn.1400f0bd0
jmp 0x1400025af
lea rcx, [0x14014ca98]
call fcn.14009fe10
cmp dword [0x14014ca98], 0xffffffff
jne 0x14000284e
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.140002d90
mov qword [0x14014ca90], rax
lea rcx, [0x14014ca98]
call fcn.14009ff10
jmp 0x14000284e
int3
int3
int3
int3
int3
int3
int3