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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406c11
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x40b424]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], edi
mov eax, dword [esi]
cmp eax, dword [0x40b8bc]
mov dword [ebp - 4], edi
jl 0x4059ed
lea edx, [ebp - 0x2c]
lea ecx, [esi + 4]
push edx
call dword [sym.imp.MSVCP90.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 0x408554
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const__]
mov eax, dword [0x40b8b4]
cmp eax, edi
je 0x405807
cmp dword [esi], 1
jg 0x405807
cmp dword [eax + 0x18], 0x10
jb 0x4057c1
mov ecx, dword [eax + 4]
jmp 0x4057c4
lea ecx, [eax + 4]
mov esi, dword [eax + 0x14]
mov eax, dword [ebp - 0x30]
mov edi, dword [eax + 0x84]
mov eax, ecx
lea ebx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4057d5
sub eax, ebx
push eax
push ecx
push esi
push edi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.dll_public:_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::compare_unsigned_int__unsigned_int__char_const___unsigned_int_const]
test eax, eax
je 0x405804
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov esi, dword [ebp - 0x30]
jmp 0x4059ed
mov esi, dword [ebp - 0x30]
mov eax, dword [0x40b41c]
cmp eax, 2
je 0x405821
cmp eax, 3
je 0x405821
cmp dword [esi], 2
jl 0x405896
cmp dword [ebp - 0x14], 0x10
jmp 0x405875
mov ebx, 0x10
cmp dword [ebp - 0x14], ebx
jb 0x405836
mov edi, dword [ebp - 0x28]
test edi, edi
jne 0x405839
xor eax, eax
jmp 0x405866
lea edi, [ebp - 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jle 0x40584f
xor eax, eax
jmp 0x405863
lea eax, [esi + esi]
call fcn.00405be0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00404da0
mov esi, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [esi], 2
jl 0x405896
cmp dword [ebp - 0x14], ebx
mov eax, dword [ebp - 0x28]
jae 0x40587d
lea eax, [ebp - 0x28]
push eax
push 0x408550
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
mov eax, dword [0x40b41c]
test eax, eax
je 0x4059b6
cmp eax, 2
je 0x4059b6
call fcn.00404e50
test al, al
je 0x4059b6
call fcn.00405610
mov ecx, dword [0x40b8cc]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [0x40b8b8], 0
je 0x405910
cmp eax, 0x80
jne 0x405910
push 3
push 0x14b
push str..wm_trace.cpp
lea ecx, [ebp - 0xdc]
call fcn.004055a0
add eax, 4
push str.Check_failed:_r___WAIT_ABANDONED.
push eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x34], 1
call fcn.004014d0
add esp, 8
test byte [ebp - 0x34], 1
mov dword [ebp - 4], 1
je 0x405928
lea ecx, [ebp - 0xdc]
call fcn.00405740
mov ebx, 0x10
cmp dword [ebp - 0x14], ebx
jb 0x40593d
mov edi, dword [ebp - 0x28]
test edi, edi
jne 0x405940
xor eax, eax
jmp 0x40596d
lea edi, [ebp - 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jle 0x405956
xor eax, eax
jmp 0x40596a
lea eax, [esi + esi]
call fcn.00405be0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00404da0
mov esi, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [0x40b8c8]
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], ebx
jae 0x405992
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
push 0
lea ecx, [ebp - 0x38]
push ecx
push edx
push eax
mov eax, dword [0x40b8c8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [0x40b8cc]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [esi], 3
jne 0x4059e0
lea edx, [ebp - 0x54]
push edx
lea ecx, [esi + 4]
call dword [sym.imp.MSVCP90.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.00404f70
add esp, 4
lea ecx, [ebp - 0x54]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esi + 4]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
lea esp, [ebp - 0xec]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405af7
mov esp, ebp
pop ebp
ret