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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4a5f12
mov eax, dword fs:[0]
push eax
sub esp, 0x448
mov eax, dword [0x4d3a00]
xor eax, esp
mov dword [esp + 0x440], eax
push ebx
push esi
push edi
mov eax, dword [0x4d3a00]
xor eax, esp
push eax
lea eax, [esp + 0x458]
mov dword fs:[0], eax
mov ebx, ecx
lea esi, [ebx + 8]
push esi
call fcn.00437c90
add esp, 4
lea eax, [esp + 0x1c]
mov ecx, esi
push eax
call fcn.004282a6
mov eax, dword [0x4d8e18]
test eax, eax
je 0x437469
lea ecx, [esp + 0x1c]
push ecx
push dword [ebx + 0xa0]
push dword [ebx + 0xa8]
push dword [ebx + 0xa4]
push dword [ebx]
call eax
add esp, 0x14
test al, al
jne 0x4375ef
test byte [0x4d4c28], 2
je 0x437489
cmp dword [esp + 0x30], 0x10
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x43748e
cmp dword [ebx], 2
jl 0x4374c6
cmp dword [esp + 0x30], 0x10
lea edi, [esp + 0x1c]
mov esi, dword [esp + 0x2c]
cmovae edi, dword [esp + 0x1c]
call fcn.0047f9c7
add eax, 0x40
push eax
push 1
push esi
push edi
call fcn.0047d221
call fcn.0047f9c7
add eax, 0x40
push eax
call fcn.0047fb56
lea esi, [ebx + 8]
add esp, 0x14
test byte [0x4d4c28], 1
je 0x437565
xor edx, edx
xor ecx, ecx
call fcn.00436e40
cmp dword [0x4d8e28], 0
jne 0x4374f5
push 0xffffffffffffffff
push dword [0x4d8e0c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x437501
push dword [0x4d8e20]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.00437060
test al, al
je 0x437542
push 2
push 0
push 0
push dword [0x4d8e2c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x30], 0x10
lea ecx, [esp + 0x14]
push 0
push ecx
push dword [esp + 0x34]
lea eax, [esp + 0x28]
cmovae eax, dword [esp + 0x28]
push eax
push dword [0x4d8e2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x4d8e28], 0
jne 0x437559
push dword [0x4d8e0c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x437565
push dword [0x4d8e20]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx], 3
jne 0x4375ef
mov ecx, 0x400
lea eax, [esp + 0x1c]
cmp dword [esp + 0x2c], ecx
cmovb ecx, dword [esp + 0x2c]
cmp dword [esp + 0x30], 0x10
cmovae eax, dword [esp + 0x1c]
test ecx, ecx
je 0x43759d
push ecx
push eax
lea eax, [esp + 0x54]
push eax
call fcn.00481c00
add esp, 0xc
lea eax, [esp + 0x4c]
push eax
call fcn.00448de0
add esp, 4
cmp dword [0x4d8e1c], 0
je 0x4375de
lea eax, [esp + 0x34]
mov ecx, esi
push eax
call fcn.004282a6
push eax
call dword [0x4d8e1c]
add esp, 4
cmp dword [esp + 0x48], 0x10
jb 0x4375ef
push dword [esp + 0x34]
call fcn.0047b56e
add esp, 4
jmp 0x4375ef
cmp byte [0x4d8ec4], 0
je 0x4375ee
push 1
call fcn.00480df6
int3
cmp dword [esp + 0x30], 0x10
jb 0x437602
push dword [esp + 0x1c]
call fcn.0047b56e
add esp, 4
push dword [ebx + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi]
lea edi, [esi + 0x50]
mov dword [esp + 0x14], edi
mov eax, dword [eax + 4]
mov dword [eax + edi - 0x50], 0x4b9cc4
mov eax, dword [edi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ecx + edi - 0x54], eax
mov dword [esp + 0x460], 0
lea esi, [edi - 0x4c]
mov dword [esp + 0x18], esi
mov dword [esi], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov byte [esp + 0x460], 2
test byte [esi + 0x3c], 1
je 0x437662
mov eax, dword [esi + 0xc]
push dword [eax]
call fcn.0047b56e
add esp, 4
mov eax, dword [esi + 0xc]
mov dword [eax], 0
mov eax, dword [esi + 0x1c]
mov dword [eax], 0
mov eax, dword [esi + 0x2c]
mov dword [eax], 0
mov eax, dword [esi + 0x10]
mov dword [eax], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov eax, dword [esi + 0x30]
mov dword [eax], 0
and dword [esi + 0x3c], 0xfffffffe
mov dword [esi + 0x38], 0
mov byte [esp + 0x460], 0
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov esi, dword [esi + 0x34]
test esi, esi
je 0x4376d8
mov ecx, dword [esi]
test ecx, ecx
je 0x4376cf
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4376cf
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push esi
call fcn.0047b56e
add esp, 4
mov dword [esp + 0x460], 0xffffffff
mov eax, dword [edi - 0x50]
mov dword [esp + 0x18], edi
mov eax, dword [eax + 4]
mov dword [eax + edi - 0x50], 0x4b9d24
mov eax, dword [edi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ecx + edi - 0x54], eax
mov dword [edi], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov dword [esp + 0x460], 0xffffffff
push edi
mov dword [edi], vtable.std::ios_base.0
call fcn.0047a97a
add esp, 4
mov ecx, dword [esp + 0x458]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x440]
xor ecx, esp
call fcn.0047aabf
mov esp, ebp
pop ebp
ret