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

Disassembly:
sub esp, 0x40
mov eax, dword [0x610304]
xor eax, esp
mov dword [esp + 0x3c], eax
mov eax, dword [sym.imp.MSVCP80.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push ebx
push edi
mov edi, ecx
lea ebx, [edi + 4]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
mov eax, dword [0x6553d4]
test eax, eax
je 0x5426d3
mov ecx, dword [edi + 0x84]
lea edx, [esp + 0x28]
push edx
mov edx, dword [edi + 0x8c]
push ecx
mov ecx, dword [edi + 0x88]
push edx
mov edx, dword [edi]
push ecx
push edx
call eax
add esp, 0x14
test al, al
jne 0x542860
mov eax, dword [0x610218]
cmp eax, 2
push ebp
push esi
mov ebp, 0x10
je 0x5426f0
cmp eax, 3
je 0x5426f0
cmp dword [edi], 2
jl 0x54273a
jmp 0x542705
cmp dword [esp + 0x48], ebp
mov eax, dword [esp + 0x34]
jae 0x5426fe
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [esp + 0x48], ebp
mov eax, dword [esp + 0x34]
jae 0x542713
lea eax, [esp + 0x34]
mov esi, dword [sym.imp.MSVCR80.dll___iob_func]
push eax
push 0x5b69c4
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fprintf]
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fflush]
add esp, 0x10
push 0
push 0
call fcn.00542240
mov eax, dword [0x610218]
add esp, 8
test eax, eax
je 0x5427e6
cmp eax, 2
je 0x5427e6
cmp dword [0x6553e0], 0
jne 0x542775
mov eax, dword [0x6553e4]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x542780
mov ecx, dword [0x6553dc]
call fcn.0054ef70
call fcn.005415e0
test al, al
je 0x5427c4
mov ecx, dword [0x6553c4]
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x48], ebp
mov eax, dword [esp + 0x34]
jae 0x5427aa
lea eax, [esp + 0x34]
mov ecx, dword [esp + 0x44]
push 0
lea edx, [esp + 0x14]
push edx
mov edx, dword [0x6553c4]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x6553e0], 0
jne 0x5427db
mov eax, dword [0x6553e4]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x5427e6
mov ecx, dword [0x6553dc]
call fcn.0054ef80
mov eax, dword [edi]
cmp eax, 4
pop esi
pop ebp
jne 0x54281e
call fcn.005513d0
test al, al
jne 0x542817
cmp dword [0x6553cc], 0
je 0x542817
lea ecx, [esp + 0xc]
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
push eax
call dword [0x6553cc]
jmp 0x542853
call fcn.005513e0
jmp 0x542860
cmp eax, 3
jne 0x542860
cmp dword [0x6553d0], 0
mov ecx, ebx
je 0x542842
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
push eax
call dword [0x6553d0]
jmp 0x542853
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
push eax
call fcn.00541760
add esp, 4
lea ecx, [esp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, dword [edi + 0x90]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
mov ecx, dword [esp + 0x44]
pop edi
pop ebx
xor ecx, esp
call fcn.00584870
add esp, 0x40
ret