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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x840
mov esi, ecx
mov eax, dword [0x5c3648]
xor eax, ebp
mov dword [esp + 0x838], eax
mov dword [ecx], 0x562770
lea edi, [ecx + 0x10]
lea ebx, [esp + 0x28]
mov ecx, edi
push ebx
call fcn.00403170
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x28]
mov dword [esp + 0x10], eax
cmp dword [esi + 8], 3
jne 0x402ced
call fcn.0040f0d0
test al, al
jne 0x402ced
lea ebx, [esp + 0x440]
push 0x3ec
push 0xff
push ebx
call fcn.004f5340
add esp, 0xc
mov ecx, ebx
lea ebx, [esp + 0x28]
call fcn.0040f100
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov eax, dword [edi + eax + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x2c], ecx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
call fcn.00406830
add esp, 4
mov edx, dword [eax]
mov ecx, eax
push 0xa
call dword [edx + 0x20]
mov byte [esp + 0xc], al
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x402b90
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x402b90
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
movsx eax, byte [esp + 0xc]
mov ecx, edi
push eax
call fcn.00407ed0
mov ecx, edi
call fcn.00401312
lea ecx, [esp + 0x440]
push edi
call fcn.0040f160
push 0x3f4
push 0xff
push ebx
call fcn.004f5340
add esp, 0xc
mov ecx, ebx
call fcn.0040f3f0
mov ecx, ebx
call fcn.0040f4b0
test al, al
jne 0x402be0
lea ecx, [esp + 0x28]
push edi
call fcn.0040f4c0
call fcn.0040f5f0
test eax, eax
je 0x402ce9
mov ebx, eax
cmp dword [eax + 0x38], 0
je 0x402ce9
push str.IPC_message_handler_context:
push edi
call fcn.004010b9
add esp, 8
mov dword [esp + 0xc], eax
lea eax, [esp + 0x428]
push dword [ebx + 0x38]
mov ebx, eax
push str.0x_08X
push eax
call fcn.0040f690
add esp, 0xc
mov eax, dword [esp + 0x438]
cmp dword [esp + 0x43c], 0xf
jbe 0x402c3d
mov ebx, dword [esp + 0x428]
push eax
push ebx
push dword [esp + 0x14]
call fcn.00407fd0
add esp, 0xc
mov ebx, eax
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov eax, dword [ebx + eax + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x20]
push eax
call fcn.00406830
add esp, 4
mov edx, dword [eax]
mov ecx, eax
push 0xa
call dword [edx + 0x20]
mov byte [esp + 0xc], al
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x402c95
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x402c95
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
movsx eax, byte [esp + 0xc]
mov ecx, ebx
push eax
call fcn.00407ed0
mov ecx, ebx
call fcn.00401312
mov eax, dword [esp + 0x43c]
cmp eax, 0x10
jb 0x402ce9
mov ecx, dword [esp + 0x428]
lea ebx, [eax + 1]
cmp ebx, 0x1000
jb 0x402cdf
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x40316a
add eax, 0x24
mov ebx, eax
mov ecx, edx
push ebx
push ecx
call fcn.004f351c
add esp, 8
lea ebx, [esp + 0x28]
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov eax, dword [edi + eax + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x2c], ecx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
call fcn.00406830
add esp, 4
mov edx, dword [eax]
mov ecx, eax
push 0xa
call dword [edx + 0x20]
mov ebx, eax
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x402d2f
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x402d2f
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
movsx eax, bl
mov ecx, edi
push eax
call fcn.00407ed0
mov ecx, edi
call fcn.00401312
lea ebx, [esi + 0x14]
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x440], xmm0
mov dword [esp + 0x454], 0xffffffff
mov dword [esp + 0x450], 0xffffffff
lea edi, [esp + 0x440]
mov ecx, ebx
push edi
call fcn.00404b90
mov eax, dword [0x5ccca4]
test eax, eax
je 0x402db3
push edi
push dword [esi + 0xa8]
push dword [esi + 0xb0]
push dword [esi + 0xac]
push dword [esi + 8]
call eax
add esp, 0x14
test al, al
je 0x402db3
mov eax, dword [esp + 0x454]
cmp eax, 0x10
jae 0x40303b
jmp 0x40306f
mov dword [esp + 0xc], ebx
mov eax, dword [0x5c3020]
test al, 2
lea ebx, [esp + 0x28]
je 0x402de1
cmp dword [esp + 0x454], 0xf
jbe 0x402dd5
mov edi, dword [esp + 0x440]
push edi
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
mov eax, dword [0x5c3020]
test al, 4
jne 0x402df0
cmp eax, 1
ja 0x402e40
cmp dword [esi + 8], 2
jl 0x402e40
push 2
call fcn.004f351c
add esp, 4
mov ecx, dword [esp + 0x450]
cmp dword [esp + 0x454], 0xf
jbe 0x402e14
mov edx, dword [esp + 0x440]
jmp 0x402e1b
lea edx, [esp + 0x440]
push eax
push 1
push ecx
push edx
call fcn.004f351c
add esp, 0x10
push 2
call fcn.004f351c
add esp, 4
push eax
call fcn.004f351c
add esp, 4
mov eax, dword [0x5c3020]
test al, 1
je 0x402e87
call fcn.00402150
test al, al
je 0x402e87
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x450]
cmp dword [esp + 0x454], 0xf
jbe 0x402e6f
mov ecx, dword [esp + 0x440]
jmp 0x402e76
lea ecx, [esp + 0x440]
push 0
push ebx
push eax
push ecx
push dword [0x5cccb0]
call dword [sym.imp.kernel32.dll_WriteFile]
cmp dword [esi + 8], 3
jne 0x40302b
mov ecx, dword [0x5ccdc4]
test ecx, ecx
je 0x402ec3
mov eax, dword [esp + 0x450]
cmp dword [esp + 0x454], 0xf
jbe 0x402eb5
mov edx, dword [esp + 0x440]
jmp 0x402ebc
lea edx, [esp + 0x440]
push eax
push edx
call fcn.004109f0
push 0x400
push 0xff
push ebx
call fcn.004f5340
add esp, 0xc
cmp dword [esp + 0x454], 0xf
jbe 0x402ee9
mov eax, dword [esp + 0x440]
jmp 0x402ef0
lea eax, [esp + 0x440]
push 0x400
push eax
push ebx
call fcn.00411990
add esp, 0xc
push ebx
call fcn.00404360
add esp, 4
mov eax, dword [0x5cccc4]
mov ecx, dword [0x5cee38]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4030fa
mov eax, dword [0x5cccbc]
cmp eax, dword [0x5cccc0]
jne 0x402f40
call fcn.0040f0e0
jmp 0x40302b
mov dword [esp + 0x1c], 0xffffffff
mov eax, dword [0x5cccc4]
mov ecx, dword [0x5cee38]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403132
mov eax, dword [0x5cccc0]
test eax, eax
jne 0x402f77
mov eax, dword [0x5cccb8]
add eax, 0xffffffff
mov ecx, 0x5cccb4
push eax
call fcn.00404d10
lea ecx, [esp + 0x1c]
push eax
call fcn.0040e610
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x403022
cmp dword [esp + 0x454], 0xf
mov dword [esp + 0x18], eax
jbe 0x402fb2
mov ebx, dword [esp + 0x440]
jmp 0x402fb9
lea ebx, [esp + 0x440]
mov eax, dword [esp + 0x10]
add eax, ebx
test ebx, ebx
mov dword [esp + 0x14], eax
je 0x402fd2
push eax
call fcn.004f8700
add esp, 4
jmp 0x402fd4
xor eax, eax
mov ecx, dword [esi + 0xa8]
mov edi, dword [esp + 0x10]
sub edi, ecx
add ebx, ecx
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
mov dword [esp + 0x428], ebx
mov dword [esp + 0x42c], edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
lea ebx, [esp + 0x428]
push eax
push ebx
push edx
push ecx
mov eax, dword [esp + 0x28]
push eax
call dword [eax + 4]
add esp, 0x14
lea ecx, [esp + 0x1c]
call fcn.0040e5f0
mov eax, dword [esp + 0x454]
cmp eax, 0x10
mov ebx, dword [esp + 0xc]
jb 0x40306f
mov ecx, dword [esp + 0x440]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x403065
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x40316a
add eax, 0x24
mov edi, eax
mov ecx, edx
push edi
push ecx
call fcn.004f351c
add esp, 8
lea ecx, [esi + 0xb8]
call fcn.0040e6d0
lea edi, [esi + 0x60]
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 4]
mov dword [esi + eax + 0x10], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 4]
lea ecx, [eax - 0x50]
mov dword [esi + eax + 0xc], ecx
mov dword [esi + 0x14], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov ecx, ebx
call fcn.00404260
mov dword [esi + 0x14], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov esi, dword [esi + 0x48]
test esi, esi
je 0x4030d5
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4030cc
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4030cc
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push esi
call fcn.004f2d4a
add esp, 4
mov dword [edi], vtable.std::ios_base.0
push edi
call fcn.004f351c
add esp, 4
mov ecx, dword [esp + 0x838]
xor ecx, ebp
call fcn.004f2990
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x5cccc4
call fcn.004f351c
add esp, 4
cmp dword [0x5cccc4], 0xffffffff
jne 0x402f29
pxor xmm0, xmm0
movdqu xmmword [0x5cccb4], xmm0
push 0x5cccc4
call fcn.004f351c
add esp, 4
jmp 0x402f29
push 0x5cccc4
call fcn.004f351c
add esp, 4
cmp dword [0x5cccc4], 0xffffffff
jne 0x402f69
pxor xmm0, xmm0
movdqu xmmword [0x5cccb4], xmm0
push 0x5cccc4
call fcn.004f351c
add esp, 4
jmp 0x402f69
call fcn.004f81f3
int3