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

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
mov eax, 0x1078
call fcn.14013a5d0
sub rsp, rax
movaps xmmword [rsp + 0x1060], xmm6
mov rsi, rcx
mov rax, qword [0x140222818]
xor rax, rsp
mov qword [rsp + 0x1058], rax
lea rax, [0x1401b7de0]
mov qword [rcx], rax
mov qword [rsp + 0x80], 0
movaps xmm6, xmmword [0x1401b6c10]
movups xmmword [rsp + 0x88], xmm6
mov qword [rsp + 0x98], 0xf
mov byte [rsp + 0x80], 0
mov eax, dword [rcx + 0x88]
mov ecx, eax
and ecx, 0x22
cmp ecx, 2
je 0x1400215db
mov rcx, qword [rsi + 0x58]
mov rdi, qword [rcx]
test rdi, rdi
je 0x1400215db
lea rax, [rsi + 0x38]
mov rcx, qword [rsi + 0x80]
cmp rdi, rcx
cmovb rdi, rcx
jmp 0x1400215f9
test al, 4
jne 0x140021642
mov rax, qword [rsi + 0x50]
mov rdi, qword [rax]
test rdi, rdi
je 0x140021642
lea rax, [rsi + 0x30]
mov rcx, qword [rsi + 0x68]
movsxd rcx, dword [rcx]
add rdi, rcx
mov rax, qword [rax]
mov r9, qword [rax]
test r9, r9
je 0x140021642
sub rdi, r9
cmp rdi, 0xf
jbe 0x14002161f
lea rcx, [rsp + 0x80]
mov rdx, rdi
call fcn.140007bd0
jmp 0x140021642
mov qword [rsp + 0x90], rdi
lea rcx, [rsp + 0x80]
mov rdx, r9
mov r8, rdi
call fcn.14013b1d0
mov byte [rsp + rdi + 0x80], 0
mov r14, qword [rsp + 0x90]
mov rax, qword [rsp + 0x98]
cmp rax, 0x10
jb 0x140021691
mov rcx, qword [rsp + 0x80]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14002168c
mov rbp, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbp
cmp rcx, 0x20
jae 0x140021ed7
add rax, 0x28
mov rdx, rax
mov rcx, rbp
call fcn.140139cc4
lea rdi, [rsi + 0x10]
cmp dword [rsi + 8], 3
jne 0x1400218e8
call fcn.140039f80
test al, al
jne 0x1400218e8
lea rbx, [rsp + 0x870]
mov r8d, 0x7d8
mov rcx, rbx
mov dl, 0xaa
call fcn.14013b880
mov rcx, rbx
call fcn.140039fa0
mov rax, qword [rdi]
movsxd rax, dword [rax + 4]
mov rax, qword [rdi + rax + 0x40]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x88], rcx
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140174a01.0]
lea rcx, [rsp + 0x80]
call fcn.14000ff85
mov rcx, qword [rax]
mov rbp, qword [rcx + 0x40]
mov rcx, rax
mov dl, 0xa
mov rax, rbp
call qword [case.0x140174a01.0]
mov ebx, eax
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x14002174b
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x140174a01.0]
test rax, rax
je 0x14002174b
mov rcx, qword [rax]
mov rbp, qword [rcx]
mov rcx, rax
mov edx, 1
mov rax, rbp
call qword [case.0x140174a01.0]
mov rcx, rdi
mov edx, ebx
call fcn.140022f30
mov rcx, rdi
call fcn.140055c24
lea rcx, [rsp + 0x870]
mov rdx, rdi
call fcn.14003a010
lea rbx, [rsp + 0x80]
mov r8d, 0x7f0
mov rcx, rbx
mov dl, 0xaa
call fcn.14013b880
mov rcx, rbx
call fcn.14003a040
mov rcx, rbx
call fcn.14003a120
test al, al
jne 0x1400217a9
lea rcx, [rsp + 0x80]
mov rdx, rdi
call fcn.14003a130
call fcn.14003a2d0
test rax, rax
je 0x1400218e0
mov rbp, rax
cmp dword [rax + 0x68], 0
je 0x1400218e0
lea rdx, str.IPC_message_handler_context:
mov rcx, rdi
call fcn.140051d70
mov rbx, rax
mov r8d, dword [rbp + 0x68]
lea rdx, str.0x_08X
lea rbp, [rsp + 0x60]
mov rcx, rbp
call fcn.14001cd60
mov r8, qword [rsp + 0x70]
cmp qword [rsp + 0x78], 0x10
jb 0x140021800
mov rbp, qword [rsp + 0x60]
mov rcx, rbx
mov rdx, rbp
call fcn.1400199b0
mov rbx, rax
mov rax, qword [rax]
movsxd rax, dword [rax + 4]
mov rax, qword [rbx + rax + 0x40]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x1050], rcx
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140174a01.0]
lea rcx, [rsp + 0x1048]
call fcn.14000ff85
mov rcx, qword [rax]
mov rbp, qword [rcx + 0x40]
mov rcx, rax
mov dl, 0xa
mov rax, rbp
call qword [case.0x140174a01.0]
mov ebp, eax
mov rcx, qword [rsp + 0x1050]
test rcx, rcx
je 0x14002188d
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x140174a01.0]
test rax, rax
je 0x14002188d
mov rcx, qword [rax]
mov r8, qword [rcx]
mov rcx, rax
mov edx, 1
mov rax, r8
call qword [case.0x140174a01.0]
mov rcx, rbx
mov edx, ebp
call fcn.140022f30
mov rcx, rbx
call fcn.140055c24
mov rax, qword [rsp + 0x78]
cmp rax, 0x10
jb 0x1400218e0
mov rcx, qword [rsp + 0x60]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400218db
mov rbp, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbp
cmp rcx, 0x20
jae 0x140021ed7
add rax, 0x28
mov rdx, rax
mov rcx, rbp
call fcn.140139cc4
mov rcx, rdi
call fcn.14001ef70
mov rax, qword [rdi]
movsxd rax, dword [rax + 4]
mov rax, qword [rdi + rax + 0x40]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x88], rcx
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140174a01.0]
lea rcx, [rsp + 0x80]
call fcn.14000ff85
mov rcx, qword [rax]
mov rbp, qword [rcx + 0x40]
mov rcx, rax
mov dl, 0xa
mov rax, rbp
call qword [case.0x140174a01.0]
mov ebx, eax
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x140021967
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x140174a01.0]
test rax, rax
je 0x140021967
mov rcx, qword [rax]
mov rbp, qword [rcx]
mov rcx, rax
mov edx, 1
mov rax, rbp
call qword [case.0x140174a01.0]
mov rcx, rdi
mov edx, ebx
call fcn.140022f30
mov rcx, rdi
call fcn.140055c24
mov qword [rsp + 0x870], 0
movups xmmword [rsp + 0x878], xmm6
mov qword [rsp + 0x888], 0xf
mov byte [rsp + 0x870], 0
mov eax, dword [rsi + 0x88]
mov ecx, eax
and ecx, 0x22
cmp ecx, 2
je 0x1400219d1
mov rcx, qword [rsi + 0x58]
mov rdi, qword [rcx]
test rdi, rdi
je 0x1400219d1
lea rax, [rsi + 0x38]
mov rcx, qword [rsi + 0x80]
cmp rdi, rcx
cmovb rdi, rcx
jmp 0x1400219ef
test al, 4
jne 0x140021a38
mov rax, qword [rsi + 0x50]
mov rdi, qword [rax]
test rdi, rdi
je 0x140021a38
lea rax, [rsi + 0x30]
mov rcx, qword [rsi + 0x68]
movsxd rcx, dword [rcx]
add rdi, rcx
mov rax, qword [rax]
mov r9, qword [rax]
test r9, r9
je 0x140021a38
sub rdi, r9
cmp rdi, 0xf
jbe 0x140021a15
lea rcx, [rsp + 0x870]
mov rdx, rdi
call fcn.140007bd0
jmp 0x140021a38
mov qword [rsp + 0x880], rdi
lea rcx, [rsp + 0x870]
mov rdx, r9
mov r8, rdi
call fcn.14013b1d0
mov byte [rsp + rdi + 0x870], 0
mov rax, qword [0x14022dbe8]
test rax, rax
je 0x140021a77
mov r9, qword [rsi + 0xf8]
mov r8d, dword [rsi + 0x108]
mov rdx, qword [rsi + 0x100]
mov ecx, dword [rsi + 8]
lea rbp, [rsp + 0x870]
mov qword [rsp + 0x20], rbp
call qword [case.0x140174a01.0]
test al, al
jne 0x140021db7
mov eax, dword [0x140222070]
test al, 2
je 0x140021aaa
cmp qword [rsp + 0x888], 0x10
jb 0x140021a96
mov rcx, qword [rsp + 0x870]
jmp 0x140021a9e
lea rcx, [rsp + 0x870]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x140222070]
test al, 4
jne 0x140021ab9
cmp dword [rsi + 8], 2
jl 0x140021b18
cmp eax, 1
ja 0x140021b18
mov rdi, qword [rsp + 0x880]
cmp qword [rsp + 0x888], 0x10
jb 0x140021adb
mov rbx, qword [rsp + 0x870]
test rdi, rdi
jne 0x140021ae8
jmp 0x140021b18
lea rbx, [rsp + 0x870]
test rdi, rdi
je 0x140021b18
xor ebp, ebp
nop word [rax + rax]
mov r8d, edi
sub r8d, ebp
lea rdx, [rbx + rbp]
mov ecx, 2
call fcn.1401482ac
test eax, eax
js 0x140021b12
mov eax, eax
add rbp, rax
cmp rbp, rdi
jb 0x140021af0
mov eax, dword [0x140222070]
test al, 1
je 0x140021b73
call fcn.140020a30
test al, al
je 0x140021b73
mov dword [rsp + 0x80], 0xaaaaaaaa
mov r8d, dword [rsp + 0x880]
cmp qword [rsp + 0x888], 0x10
jb 0x140021b4d
mov rdx, qword [rsp + 0x870]
jmp 0x140021b55
lea rdx, [rsp + 0x870]
mov rcx, qword [0x14022dc00]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
jne 0x140021db7
mov rcx, qword [0x14022dbb0]
test rcx, rcx
je 0x140021bc2
mov rax, qword [rsp + 0x880]
cmp qword [rsp + 0x888], 0x10
jb 0x140021ba6
mov rdx, qword [rsp + 0x870]
jmp 0x140021bae
lea rdx, [rsp + 0x870]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x50]
call fcn.14001fe30
lea rdi, [rsp + 0x80]
mov r8d, 0x400
mov rcx, rdi
mov dl, 0xaa
call fcn.14013b880
cmp qword [rsp + 0x888], 0x10
jb 0x140021bef
mov rdx, qword [rsp + 0x870]
jmp 0x140021bf7
lea rdx, [rsp + 0x870]
mov r8d, 0x400
mov rcx, rdi
call fcn.140033a60
mov rcx, rdi
call fcn.140014c00
mov eax, dword [0x14022dc30]
mov ecx, dword [0x140231458]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140021edc
mov rax, qword [0x14022dc20]
cmp rax, qword [0x14022dc28]
je 0x140021f70
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x1048], rax
mov eax, dword [0x14022dc30]
mov ecx, dword [0x140231458]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140021f26
mov rdx, qword [0x14022dc28]
lea rax, [0x14022dc10]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdx
test rdx, rdx
jne 0x140021ca3
mov rax, qword [rsp + 0x60]
mov rdx, qword [rax + 8]
dec rdx
mov qword [rsp + 0x68], rdx
mov rcx, qword [rsp + 0x60]
call fcn.140022e70
lea rcx, [rsp + 0x1048]
mov rdx, rax
call fcn.140032d00
mov rdi, qword [rsp + 0x1048]
test rdi, rdi
je 0x140021daa
mov r15, qword [rsp + 0x870]
mov rbp, qword [rsp + 0x888]
cmp rbp, 0x10
lea rbx, [rsp + 0x870]
mov rcx, rbx
cmovae rcx, r15
add rcx, r14
mov qword [rsp + 0x40], rcx
je 0x140021d0f
call fcn.1401414c0
mov qword [rsp + 0x48], rax
jmp 0x140021d61
mov qword [rsp + 0x48], 0
lea rdx, str....._base_strings_string_piece.h
lea r9, [0x1401b6cc4]
lea rdi, [rsp + 0x60]
mov rcx, rdi
mov r8d, 0x7c
call fcn.140008430
mov rcx, rdi
call fcn.1400085c0
mov rcx, rdi
call fcn.1400085d0
mov r15, qword [rsp + 0x870]
mov rbp, qword [rsp + 0x888]
mov rdi, qword [rsp + 0x1048]
mov rax, qword [rsi + 0xf8]
sub r14, rax
cmp rbp, 0x10
cmovae rbx, r15
add rbx, rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], r14
mov r8d, dword [rsi + 0x108]
mov rdx, qword [rsi + 0x100]
mov rax, qword [rdi + 8]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x30]
mov rcx, rdi
call qword [case.0x140174a01.0]
lea rcx, [rsp + 0x1048]
call fcn.140032ce0
mov rax, qword [rsp + 0x888]
cmp rax, 0x10
jb 0x140021dfe
mov rcx, qword [rsp + 0x870]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140021df9
mov rbp, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbp
cmp rcx, 0x20
jae 0x140021ed7
add rax, 0x28
mov rdx, rax
mov rcx, rbp
call fcn.140139cc4
lea rcx, [rsi + 0x10c]
call fcn.140036950
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsi + rax + 0x10], rcx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea ecx, [rax - 0x88]
mov dword [rsi + rax + 0xc], ecx
lea rcx, [rsi + 0x18]
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsi + 0x18], rax
call fcn.140014ac0
lea rax, vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov qword [rsi + 0x18], rax
mov rdi, qword [rsi + 0x78]
test rdi, rdi
je 0x140021e92
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140021e8a
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x140174a01.0]
test rax, rax
je 0x140021e8a
mov rcx, qword [rax]
mov rbp, qword [rcx]
mov rcx, rax
mov edx, 1
mov rax, rbp
call qword [case.0x140174a01.0]
mov rcx, rdi
call fcn.14013a5a4
lea rax, vtable.std::ios_base.0
mov qword [rsi + 0x98], rax
add rsi, 0x98
mov rcx, rsi
call fcn.140117f30
mov rcx, qword [rsp + 0x1058]
xor rcx, rsp
call fcn.14013a2d0
movaps xmm6, xmmword [rsp + 0x1060]
add rsp, 0x1078
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
call fcn.140140ecc
lea rcx, [0x14022dc30]
call fcn.14013a0a8
cmp dword [0x14022dc30], 0xffffffff
jne 0x140021c32
mov qword [0x14022dc10], 0
xorps xmm0, xmm0
movups xmmword [0x14022dc18], xmm0
mov qword [0x14022dc28], 0
lea rcx, [0x14022dc30]
call fcn.14013a048
jmp 0x140021c32
lea rcx, [0x14022dc30]
call fcn.14013a0a8
cmp dword [0x14022dc30], 0xffffffff
jne 0x140021c7d
mov qword [0x14022dc10], 0
xorps xmm0, xmm0
movups xmmword [0x14022dc18], xmm0
mov qword [0x14022dc28], 0
lea rcx, [0x14022dc30]
call fcn.14013a048
jmp 0x140021c7d
int3