Function at 0x140169410
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, 0x528
movaps xmmword [rsp + 0x510], xmm6
mov rsi, rcx
mov rax, qword [0x14033f038]
xor rax, rsp
mov qword [rsp + 0x508], rax
lea rax, [0x1402fe5f0]
mov qword [rcx], rax
lea rbx, [rcx + 0x10]
lea rdi, [rcx + 0x18]
lea r14, [rsp + 0xf0]
mov rcx, rdi
mov rdx, r14
call fcn.14009c71a
movzx eax, byte [r14 + 0x17]
mov r12d, eax
and r12d, 0x7f
test al, al
jns 0x14016947d
mov r12, qword [rsp + 0xf8]
jns 0x14016948c
mov rcx, qword [rsp + 0xf0]
call fcn.14016eccc
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
mov rax, qword [rbx + rax + 0x30]
lea r14, [rsp + 0xf0]
mov qword [r14], rax
lock inc dword [rax + 8]
lea rdx, [0x140351d10]
mov rcx, r14
call fcn.140045294
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [case.0x140211850.0]
mov ebp, eax
mov rcx, qword [r14]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
je 0x140169d01
mov rcx, rbx
mov edx, ebp
call fcn.14007b342
mov rcx, rbx
call fcn.14007b49a
movabs r13, 0xaaaaaaaaaaaaaaaa
lea r14, [rsp + 0x70]
mov qword [r14 + 0x10], r13
movaps xmm6, xmmword [0x140301d60]
movaps xmmword [r14], xmm6
mov rcx, rdi
mov rdx, r14
call fcn.14009c71a
test byte [0x140341890], 0x19
jne 0x1401698d7
cmp dword [rsi + 8], 3
jne 0x14016953d
cmp byte [0x140352b3c], 0
je 0x14016972b
mov eax, dword [0x1403411a8]
test al, 2
je 0x140169569
cmp byte [rsp + 0x87], 0
jns 0x140169558
mov rcx, qword [rsp + 0x70]
jmp 0x14016955d
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x1403411a8]
test al, 4
jne 0x140169578
cmp dword [rsi + 8], 2
jl 0x1401695c3
cmp eax, 1
ja 0x1401695c3
lea rbx, [rsp + 0x70]
movzx ecx, byte [rbx + 0x17]
mov r14d, ecx
and r14d, 0x7f
test cl, cl
cmovs r14, qword [rbx + 8]
cmovs rbx, qword [rbx]
test r14, r14
je 0x1401695c3
xor r15d, r15d
mov r8d, r14d
sub r8d, r15d
lea rdx, [rbx + r15]
mov ecx, 2
call fcn.14018eb34
test eax, eax
js 0x1401695bd
mov eax, eax
add r15, rax
cmp r14, r15
ja 0x14016959b
mov eax, dword [0x1403411a8]
test al, 1
jne 0x140169678
cmp dword [rsi + 8], 3
je 0x1401696ca
cmp byte [rsp + 0x87], 0
jns 0x1401695e9
mov rcx, qword [rsp + 0x70]
call fcn.14016eccc
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.14016ed94
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x1402fe020]
mov qword [rsi + rax + 0x10], rcx
lea rax, [0x1402fe030]
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x140169630
mov rcx, qword [rsi + 0x58]
call fcn.14016eccc
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.140043168
mov rcx, rdi
call fcn.14004a330
mov rcx, rsi
call fcn.14006d624
mov rcx, qword [rsp + 0x508]
xor rcx, rsp
call fcn.140171860
movaps xmm6, xmmword [rsp + 0x510]
add rsp, 0x528
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.14020a380
test al, al
je 0x1401695cb
lea r9, [rsp + 0xf0]
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 [0x140352b08]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1401695cb
mov rcx, qword [0x140352ad8]
test rcx, rcx
je 0x140169705
lea rax, [rsp + 0x70]
movzx edx, byte [rax + 0x17]
mov r8d, edx
and r8d, 0x7f
test dl, dl
mov r9, qword [rax]
cmovns r9, rax
lea rdx, [rsp + 0x60]
mov qword [rdx], r9
cmovs r8, qword [rax + 8]
mov qword [rdx + 8], r8
call fcn.140209550
lea rcx, [rsp + 0xf0]
mov r8d, 0x400
mov dl, 0xaa
call fcn.140173760
cmp byte [rsp + 0x87], 0
jns 0x140169789
mov rax, qword [rsp + 0x70]
jmp 0x14016978e
mov byte [0x140352b3c], 1
mov eax, dword [0x140352b48]
mov ecx, dword [0x14034fed0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140169ccc
lea rbx, [rsp + 0xf0]
mov rcx, rsi
mov rdx, rbx
call fcn.14020a650
cmp byte [rbx + 0x17], 0
jns 0x14016977d
mov rcx, qword [rsp + 0xf0]
call fcn.14016eccc
mov byte [0x140352b3c], 0
jmp 0x14016953d
lea rax, [rsp + 0x70]
xor ecx, ecx
mov dl, byte [rax + rcx]
mov byte [rsp + rcx + 0xf0], dl
test dl, dl
je 0x1401697b2
inc rcx
cmp rcx, 0x400
jne 0x140169790
mov byte [rsp + 0x4ef], 0
lea rcx, [rsp + 0xf0]
call fcn.14004a330
call fcn.140127bf0
mov rax, qword [0x140352b28]
cmp rax, qword [0x140352b30]
je 0x140169d13
call fcn.140127bf0
mov rax, qword [0x140352b30]
test rax, rax
mov rcx, qword [0x140352b20]
cmove rax, rcx
lea rdx, [rax - 1]
cmp rcx, rdx
jb 0x140169d16
mov rcx, qword [0x140352b18]
mov rbx, qword [rcx + rax*8 - 8]
test rbx, rbx
je 0x1401695d5
mov eax, 1
lock xadd dword [rbx], eax
test eax, eax
jle 0x140169d19
cmp byte [rsp + 0x87], 0
jns 0x140169836
mov r14, qword [rsp + 0x70]
jmp 0x14016983b
lea r14, [rsp + 0x70]
mov rcx, r14
add rcx, r12
mov qword [rsp + 0x50], rcx
je 0x1401698c4
call fcn.140198c60
mov qword [rsp + 0x58], rax
mov rax, qword [rsi + 0x118]
sub r12, rax
add r14, rax
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], r12
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
mov eax, 1
lock xadd dword [rbx], eax
test eax, eax
jle 0x140169d1c
mov rax, qword [rbx + 8]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x40]
mov rcx, rbx
call qword [case.0x140211850.0]
lock dec dword [rbx]
je 0x1401698c8
lock dec dword [rbx]
jne 0x1401695d5
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [case.0x140211850.0]
jmp 0x1401695d5
xor eax, eax
jmp 0x14016984d
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [case.0x140211850.0]
jmp 0x1401698a9
lea rbx, [rsp + 0xb0]
movaps xmmword [rbx + 0x10], xmm6
movaps xmmword [rbx], xmm6
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov byte [rsp + 0x30], 0
lea r8, [0x140341890]
lea r9, str.LogMessage
mov rcx, rbx
mov dl, 0x49
call fcn.1401bcd60
mov rax, qword [rbx]
test rax, rax
jne 0x140169925
lea rcx, [rsp + 0xb0]
call fcn.1401b25f0
jmp 0x14016952a
mov cl, byte [rsp + 0xc8]
mov rdx, qword [rsp + 0xb8]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], rdx
xor ebp, ebp
mov qword [rsp + 0xa0], rbp
mov byte [rsp + 0xa8], cl
lea r15, [rsp + 0xf0]
mov qword [r15], rbp
mov qword [rsp + 0x88], rbp
mov rax, qword [rsp + 0x90]
mov qword [r15 + 8], rax
mov rax, qword [rsp + 0x98]
mov qword [r15 + 0x10], rax
mov eax, dword [rsp + 0x99]
mov dword [r15 + 0x11], eax
movzx eax, word [rsp + 0x9d]
mov word [r15 + 0x15], ax
mov al, byte [rsp + 0x9f]
mov byte [r15 + 0x17], al
mov rax, qword [rsp + 0xa0]
mov qword [r15 + 0x18], rax
mov al, byte [rsp + 0xa8]
mov byte [r15 + 0x20], al
mov rcx, qword [r15 + 8]
mov edx, 0x15
call fcn.1401b4566
mov rbx, rax
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
lea rdx, [rsp + 0xd8]
mov qword [rdx], rbp
mov qword [rdx + 8], rcx
mov dword [rdx + 0x10], eax
mov rcx, r15
call fcn.1400894f0
mov r15, rax
mov qword [rsp + 0x38], rbx
mov rcx, qword [rbx + 0x10]
test rcx, rcx
jne 0x140169c2c
lea rax, [rsp + 0x4f9]
mov qword [rax - 1], r13
mov qword [rax + 6], r13
mov byte [rax - 1], 8
lea rcx, [rsp + 0x4f8]
cmp r15, 0x80
jae 0x140169b93
mov rbp, rcx
mov byte [rax], r15b
sub rbp, rcx
add rbp, 2
mov rax, qword [rsp + 0x38]
mov r15, qword [rax]
mov r8d, ebp
mov rcx, qword [r15 + 0x18]
lea rbx, [rcx + r8]
cmp rbx, qword [r15 + 0x10]
ja 0x140169ca2
cmp ebp, 2
jne 0x140169bdf
movzx eax, word [rsp + 0x4f8]
mov word [rcx], ax
mov qword [r15 + 0x18], rbx
mov rax, qword [rsp + 0x38]
add dword [rax + 0x20], ebp
movzx eax, byte [rsp + 0x87]
test al, al
jns 0x140169a8d
mov r8, qword [rsp + 0x78]
jmp 0x140169a94
mov r8d, eax
and r8d, 0x7f
mov rcx, qword [rsi + 0x118]
sub r8, rcx
jb 0x140169d1f
test al, al
jns 0x140169aad
mov r14, qword [rsp + 0x70]
add r14, rcx
lea r15, [rsp + 0xd8]
mov rcx, r15
mov rdx, r14
call fcn.14007bd08
lea rcx, [rsp + 0xf0]
mov rdx, r15
call fcn.14011b6f0
mov r14, rax
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax + 0x10]
test rcx, rcx
jne 0x140169c67
lea rax, [rsp + 0x4f9]
mov qword [rax - 1], r13
mov qword [rax + 6], r13
mov byte [rax - 1], 0x10
lea rcx, [rsp + 0x4f8]
cmp r14, 0x80
jae 0x140169bb9
mov r15, rcx
mov byte [rax], r14b
sub r15, rcx
add r15, 2
mov rax, qword [rsp + 0x38]
mov r14, qword [rax]
mov r8d, r15d
mov rcx, qword [r14 + 0x18]
lea rbx, [rcx + r8]
cmp rbx, qword [r14 + 0x10]
ja 0x140169cb7
cmp r15d, 2
jne 0x140169bf3
movzx eax, word [rsp + 0x4f8]
mov word [rcx], ax
mov qword [r14 + 0x18], rbx
mov rax, qword [rsp + 0x38]
add dword [rax + 0x20], r15d
cmp byte [rsp + 0xef], 0
jns 0x140169b74
mov rcx, qword [rsp + 0xd8]
call fcn.14016eccc
lea rcx, [rsp + 0xf0]
call fcn.14008c4ba
lea rcx, [rsp + 0x88]
call fcn.14008c4ba
jmp 0x140169913
mov rdx, r15
mov r8d, edx
or r8b, 0x80
mov byte [rax], r8b
shr r15, 7
inc rax
cmp rdx, 0x3fff
ja 0x140169b93
lea rbp, [rax - 1]
jmp 0x140169a33
mov rdx, r14
mov r8d, edx
or r8b, 0x80
mov byte [rax], r8b
shr r14, 7
inc rax
cmp rdx, 0x3fff
ja 0x140169bb9
lea r15, [rax - 1]
jmp 0x140169b14
cmp ebp, 3
jne 0x140169c08
mov al, byte [rsp + 0x4fa]
mov byte [rcx + 2], al
jmp 0x140169a63
cmp r15d, 3
jne 0x140169c1a
mov al, byte [rsp + 0x4fa]
mov byte [rcx + 2], al
jmp 0x140169b45
lea rdx, [rsp + 0x4f8]
call fcn.1401730b0
jmp 0x140169a6e
lea rdx, [rsp + 0x4f8]
call fcn.1401730b0
jmp 0x140169b50
call fcn.14003d498
mov rcx, qword [rsp + 0x38]
add dword [rcx + 0x20], eax
mov rcx, qword [rcx + 8]
mov rax, qword [rcx]
dec dword [rax + 0x308]
jne 0x140169c55
mov rax, qword [rcx]
cmp qword [rax], 0
jne 0x140169d22
mov rax, qword [rsp + 0x38]
mov qword [rax + 0x10], 0
jmp 0x140169a07
call fcn.14003d498
mov rcx, qword [rsp + 0x38]
add dword [rcx + 0x20], eax
mov rcx, qword [rcx + 8]
mov rax, qword [rcx]
dec dword [rax + 0x308]
jne 0x140169c90
mov rax, qword [rcx]
cmp qword [rax], 0
jne 0x140169d2c
mov rax, qword [rsp + 0x38]
mov qword [rax + 0x10], 0
jmp 0x140169ae8
lea rdx, [rsp + 0x4f8]
mov rcx, r15
call fcn.1401b4f62
jmp 0x140169a72
lea rdx, [rsp + 0x4f8]
mov rcx, r14
call fcn.1401b4f62
jmp 0x140169b54
lea rcx, [0x140352b48]
call fcn.14016f8b4
cmp dword [0x140352b48], 0xffffffff
jne 0x140169757
mov qword [0x140352b40], 0
lea rcx, [0x140352b48]
call fcn.14016ef8c
jmp 0x140169757
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140211850.0]
jmp 0x1401694e2
int3
int3
int3
int3
int3
call fcn.1401ca5f6
jmp 0x140169c55
call fcn.1401ca5f6
jmp 0x140169c90