Function at 0x140008290
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 0x140008643
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x1400082cf
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x1400085ef
cmp rdi, r13
jae 0x1400085f2
cmp rdi, 0x16
ja 0x140008562
lea rcx, [rsp + 0x48]
mov byte [rcx + 0x17], dil
lea r15, [rcx + rdi]
cmp rcx, rbx
ja 0x14000830a
cmp r15, rbx
ja 0x140008604
test rdi, rdi
je 0x14000831a
mov rdx, rbx
mov r8, rdi
call fcn.1400a9230
lea r14, [rsi + 0x10]
mov byte [r15], 0
movzx edi, byte [rsp + 0x5f]
test dil, dil
jns 0x140008331
mov rdi, qword [rsp + 0x50]
jns 0x14000833d
mov rcx, qword [rsp + 0x48]
call fcn.1400a5630
mov rax, qword [r14]
movsxd rax, dword [rax + 4]
mov rax, qword [r14 + rax + 0x30]
mov qword [rsp + 0x48], rax
lea r15, [0x14014aae0]
cmp rax, r15
jne 0x1400085f5
lea rdx, [0x14014b7e0]
lea rbx, [rsp + 0x48]
mov rcx, rbx
call fcn.140098dd0
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x14012eaa8]
mov ebp, eax
mov rcx, qword [rbx]
cmp rcx, r15
jne 0x14000861f
mov rcx, r14
mov edx, ebp
call fcn.1400088f0
mov rcx, r14
call fcn.1400087d0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
movaps xmm0, xmmword [0x140119af0]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
je 0x140008666
mov rax, qword [rsi + 0x48]
mov r14, qword [rsi + 0x70]
cmp r14, rax
jae 0x1400083e1
mov qword [rsi + 0x70], rax
mov r14, rax
mov r15, qword [rsi + 0x40]
sub r14, r15
js 0x1400085fe
cmp r14, r13
jae 0x140008601
cmp r14, 0x16
ja 0x140008525
lea rcx, [rsp + 0x30]
mov byte [rcx + 0x17], r14b
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x14000841c
cmp r12, r15
ja 0x140008607
test r14, r14
je 0x14000842c
mov rdx, r15
mov r8, r14
call fcn.1400a9230
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.1400108b0
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 [0x14014b866]
test al, al
jne 0x140008736
cmp byte [rsp + 0x7f], 0
jns 0x14000849d
mov rcx, qword [rsp + 0x68]
call fcn.1400a5630
mov eax, dword [rsi + 8]
cmp eax, 3
je 0x14000868b
cmp eax, 2
jge 0x1400085a2
call fcn.1400d8ed0
test al, al
je 0x1400084f5
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 [0x14014ba58]
mov qword [rsp + 0x20], 0
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x14000860a
cmp byte [rsp + 0x47], 0
jns 0x140008510
mov rcx, qword [rsp + 0x30]
call fcn.1400a5630
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.1400a5638
mov rcx, rax
mov qword [rsp + 0x30], rax
bts r12, 0x3f
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
jmp 0x14000840a
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.1400a5638
mov rcx, rax
mov qword [rsp + 0x48], rax
bts r14, 0x3f
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], rdi
jmp 0x1400082f8
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 0x1400084b2
xor r12d, r12d
mov r8d, ebx
sub r8d, r12d
lea rdx, [r15 + r12]
mov ecx, 2
call fcn.1400a5be8
test eax, eax
js 0x1400084b2
mov eax, eax
add r12, rax
cmp r12, rbx
jb 0x1400085c4
jmp 0x1400084b2
int3
int3
lock inc dword [rax + 8]
jmp 0x14000835e
int3
int3
int3
int3
lea r8, [rsp + 0x30]
mov rcx, rsi
mov rdx, rdi
call fcn.1400f43c0
jmp 0x1400084ff
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
jne 0x140008395
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x14012eaa8]
jmp 0x140008395
xor ebx, ebx
mov edi, 0
test al, 8
je 0x1400082ef
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
sub rdi, rbx
jns 0x1400082dc
int3
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x140008401
mov r15, qword [rsi + 0x28]
mov r14, qword [rsi + 0x38]
sub r14, r15
jns 0x1400083ee
int3
mov eax, 3
cmp byte [0x14014ba84], 0
jne 0x1400084a9
mov byte [0x14014ba84], 1
mov eax, dword [0x14014ba90]
mov ecx, dword [0x140148908]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000877a
mov rcx, rsi
mov rdx, rbx
call fcn.1400f42f0
movzx eax, byte [rsp + 0x5f]
test al, al
jns 0x1400086e7
mov rax, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rax
test rax, rax
js 0x1400087bc
je 0x140008705
test rbx, rbx
je 0x1400087bf
mov rcx, qword [0x14014ba88]
lea rdx, [rsp + 0x68]
call fcn.140001450
cmp byte [rsp + 0x5f], 0
jns 0x140008727
mov rcx, qword [rsp + 0x48]
call fcn.1400a5630
mov byte [0x14014ba84], 0
mov eax, dword [rsi + 8]
jmp 0x1400084a9
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.1400f4990
jmp 0x14000848c
lea rcx, [0x14014ba90]
call fcn.1400a56f4
cmp dword [0x14014ba90], 0xffffffff
jne 0x1400086c9
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.1400088e0
mov qword [0x14014ba88], rax
lea rcx, [0x14014ba90]
call fcn.1400a5694
jmp 0x1400086c9
int3
int3