Function at 0x140038f40
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x498
mov r12, rcx
mov rax, qword [0x140117028]
xor rax, rsp
mov qword [rsp + 0x490], rax
lea rax, [0x1400fcbf8]
mov qword [rcx], rax
lea rsi, [rcx + 0x10]
lea r14, [rcx + 0x18]
lea rdi, [rsp + 0x90]
mov rcx, r14
mov rdx, rdi
call fcn.14001aca0
movzx eax, byte [rdi + 0x17]
mov r13d, eax
and r13d, 0x7f
test al, al
jns 0x140038fa4
mov r13, qword [rsp + 0x98]
jns 0x140038fb3
mov rcx, qword [rsp + 0x90]
call fcn.140080ca8
mov rax, qword [rsi]
movsxd rcx, dword [rax + 4]
add rcx, rsi
lea r15, [rsp + 0x90]
mov rdx, r15
call fcn.14005b3e0
lea rdx, [0x140128900]
mov rcx, r15
call fcn.14005b670
mov rcx, qword [rax]
mov rdi, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, rdi
call qword [0x14013a008]
mov ebx, eax
mov rcx, r15
call fcn.14005b4f0
mov rcx, rsi
mov edx, ebx
call fcn.14001aa00
mov rcx, rsi
call fcn.140019db0
movabs rbp, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x60]
mov qword [rbx + 0x10], rbp
movaps xmm0, xmmword [0x1400fdb10]
movaps xmmword [rbx], xmm0
mov rcx, r14
mov rdx, rbx
call fcn.14001aca0
test byte [0x140119b80], 0x19
jne 0x1400391a4
cmp dword [r12 + 8], 3
je 0x1400391c4
mov rax, qword [0x14012a0b0]
test rax, rax
je 0x140039086
mov r9, qword [r12 + 0x118]
mov r8d, dword [r12 + 0x128]
mov rdx, qword [r12 + 0x120]
mov ecx, dword [r12 + 8]
mov qword [rsp + 0x20], rbx
call qword [0x14013a008]
test al, al
jne 0x1400390c1
mov eax, dword [0x140119650]
test al, 2
jne 0x140039267
test al, 4
jne 0x140039153
cmp dword [r12 + 8], 2
jl 0x1400390ad
cmp eax, 1
jbe 0x140039153
test al, 1
jne 0x140039287
cmp dword [r12 + 8], 3
je 0x1400392d9
cmp byte [rsp + 0x77], 0
jns 0x1400390d2
mov rcx, qword [rsp + 0x60]
call fcn.140080ca8
lea rcx, [r12 + 0x12c]
call fcn.140070690
mov rax, qword [r12 + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, str.0K_v_
mov qword [r12 + rax + 0x10], rcx
lea rax, str._L_v_
mov qword [r12 + 0x18], rax
cmp byte [r12 + 0x6f], 0
jns 0x140039112
mov rcx, qword [r12 + 0x58]
call fcn.140080ca8
sub r12, 0xffffffffffffff80
mov rcx, r14
call fcn.140057d40
mov rcx, r14
call fcn.140058290
mov rcx, r12
call fcn.140057d30
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.140081fb0
nop
add rsp, 0x498
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rdi, [rsp + 0x60]
movzx ecx, byte [rdi + 0x17]
mov ebx, ecx
and ebx, 0x7f
test cl, cl
cmovs rbx, qword [rdi + 8]
cmovs rdi, qword [rdi]
test rbx, rbx
je 0x1400390ad
xor esi, esi
mov r8d, ebx
sub r8d, esi
lea rdx, [rdi + rsi]
mov ecx, 2
call fcn.14009bd6c
test eax, eax
js 0x140039199
mov eax, eax
add rsi, rax
cmp rbx, rsi
ja 0x140039177
mov eax, dword [0x140119650]
jmp 0x1400390ad
lea rdx, [rsp + 0x90]
mov qword [rdx], r12
mov qword [rdx + 8], rbx
lea rcx, str.LogMessage
call fcn.1400d1550
jmp 0x140039042
cmp byte [0x14012a0fc], 0
jne 0x14003904e
mov byte [0x14012a0fc], 1
mov eax, dword [0x14012a108]
mov ecx, dword [0x140126b24]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14003942d
mov rcx, r12
mov rdx, r15
call fcn.1400d1730
movzx eax, byte [rsp + 0xa7]
mov ecx, eax
and ecx, 0x7f
test al, al
cmovs r15, qword [rsp + 0x90]
cmovs rcx, qword [rsp + 0x98]
lea rdx, [rsp + 0x80]
mov qword [rdx], r15
mov qword [rdx + 8], rcx
mov rcx, qword [0x14012a100]
call fcn.1400706b0
cmp byte [rsp + 0xa7], 0
jns 0x14003925b
mov rcx, qword [rsp + 0x90]
call fcn.140080ca8
mov byte [0x14012a0fc], 0
jmp 0x14003904e
cmp byte [rsp + 0x77], 0
jns 0x140039273
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x140119650]
jmp 0x140039094
call fcn.1400d1260
test al, al
je 0x1400390b5
lea r9, [rsp + 0x90]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x60]
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 [0x14012a0c8]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1400390b5
mov rcx, qword [0x14012a1b8]
test rcx, rcx
je 0x140039312
lea rax, [rsp + 0x60]
movzx edx, byte [rax + 0x17]
mov ebx, edx
and ebx, 0x7f
test dl, dl
mov rdi, qword [rax]
cmovns rdi, rax
lea rdx, [rsp + 0x50]
mov qword [rdx], rdi
cmovs rbx, qword [rax + 8]
mov qword [rdx + 8], rbx
call fcn.1400d3a30
lea rdi, [rsp + 0x90]
mov r8d, 0x400
mov rcx, rdi
mov dl, 0xaa
call fcn.1400840e0
cmp byte [rsp + 0x77], 0
jns 0x140039338
mov rdx, qword [rsp + 0x60]
jmp 0x14003933d
lea rdx, [rsp + 0x60]
mov r8d, 0x400
mov rcx, rdi
call fcn.1400633a0
mov rcx, rdi
call fcn.140058290
call fcn.1400d14e0
mov rcx, qword [rax + 0x10]
cmp rcx, qword [rax + 0x18]
je 0x14003946f
mov qword [rsp + 0x80], rbp
call fcn.1400d14e0
mov rcx, qword [rax + 8]
mov rdx, qword [rax + 0x18]
test rdx, rdx
cmove rdx, rcx
dec rdx
cmp rcx, rdx
jb 0x140039472
shl rdx, 3
add rdx, qword [rax]
lea rsi, [rsp + 0x80]
mov rcx, rsi
call fcn.140062400
mov rdi, qword [rsi]
test rdi, rdi
je 0x14003941b
cmp byte [rsp + 0x77], 0
jns 0x1400393bb
mov rsi, qword [rsp + 0x60]
jmp 0x1400393c0
lea rsi, [rsp + 0x60]
mov rcx, rsi
add rcx, r13
mov qword [rsp + 0x40], rcx
je 0x140039475
call fcn.14009fb90
lea rcx, [rsp + 0x40]
mov qword [rcx + 8], rax
mov rax, qword [r12 + 0x118]
sub r13, rax
add rsi, rax
lea r9, [rsp + 0x30]
mov qword [r9], rsi
mov qword [r9 + 8], r13
mov r8d, dword [r12 + 0x128]
mov rdx, qword [r12 + 0x120]
mov rax, qword [rdi + 8]
mov qword [rsp + 0x20], rcx
mov rcx, rdi
call qword [0x14013a008]
lea rcx, [rsp + 0x80]
call fcn.1400623e0
jmp 0x1400390c1
lea rcx, [0x14012a108]
call fcn.140080dc0
cmp dword [0x14012a108], 0xffffffff
jne 0x1400391fd
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.14004a2e0
mov qword [0x14012a100], rax
lea rcx, [0x14012a108]
call fcn.140080e58
jmp 0x1400391fd
int3
int3
int3