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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x431220]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 8]
push ebx
call fcn.004090d0
add esp, 4
lea eax, [ebp - 0x434]
lea ecx, [esi + 0xc]
push eax
call fcn.00408c80
mov eax, dword [0x43326c]
test eax, eax
je 0x4092b4
lea ecx, [ebp - 0x434]
push ecx
push dword [esi + 0xa0]
push dword [esi + 0xa8]
push dword [esi + 0xa4]
push dword [esi]
call eax
add esp, 0x14
test al, al
jne 0x409506
test byte [0x431040], 2
je 0x4092da
cmp dword [ebp - 0x420], 0x10
lea eax, [ebp - 0x434]
cmovae eax, dword [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x4092df
cmp dword [esi], 2
jl 0x409318
cmp dword [ebp - 0x420], 0x10
lea eax, [ebp - 0x434]
cmovae eax, dword [ebp - 0x434]
push eax
push 0x426a64
call fcn.0040d10a
add eax, 0x40
push eax
call fcn.0040dd6e
call fcn.0040d10a
add eax, 0x40
push eax
call fcn.0040cd91
add esp, 0x10
test byte [0x431040], 1
je 0x409423
push 0
push 0
call fcn.00409ee0
add esp, 8
cmp dword [0x43327c], 0
jne 0x40934a
push 0xffffffffffffffff
push dword [0x433274]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x409355
mov ecx, dword [0x433270]
call fcn.0040a2d0
call fcn.0040a030
test al, al
je 0x409401
push 2
push 0
push 0
push dword [0x43325c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x434]
mov dword [ebp - 0x408], 0xf
push eax
lea ecx, [ebp - 0x41c]
mov dword [ebp - 0x40c], 0
mov byte [ebp - 0x41c], 0
call fcn.00401530
lea eax, [ebp - 0x41c]
push 0
push eax
call fcn.00402bc0
mov ecx, eax
call fcn.00402bf0
cmp dword [ebp - 0x408], 0x10
lea ecx, [ebp - 0x438]
push 0
push ecx
push dword [ebp - 0x40c]
lea eax, [ebp - 0x41c]
cmovae eax, dword [ebp - 0x41c]
push eax
push dword [0x43325c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x408], 0x10
jb 0x409401
push dword [ebp - 0x41c]
call fcn.0040be2b
add esp, 4
cmp dword [0x43327c], 0
jne 0x409418
push dword [0x433274]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x409423
mov ecx, dword [0x433270]
call fcn.0040a2e0
mov eax, dword [esi]
cmp eax, 4
jne 0x4094af
mov ecx, 0x400
lea eax, [ebp - 0x434]
cmp dword [ebp - 0x424], ecx
cmovb ecx, dword [ebp - 0x424]
cmp dword [ebp - 0x420], 0x10
cmovae eax, dword [ebp - 0x434]
test ecx, ecx
je 0x409469
push ecx
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.0040c540
add esp, 0xc
lea eax, [ebp - 0x404]
push eax
call fcn.0040a400
add esp, 4
call fcn.0040a300
test al, al
je 0x409488
call fcn.0040a310
jmp 0x409506
cmp dword [0x433264], 0
je 0x409481
lea eax, [ebp - 0x41c]
push eax
lea ecx, [esi + 0xc]
call fcn.00408c80
lea eax, [ebp - 0x41c]
push eax
call dword [0x433264]
jmp 0x4094ec
cmp eax, 3
jne 0x409506
cmp dword [0x433268], 0
lea eax, [ebp - 0x41c]
lea ecx, [esi + 0xc]
push eax
je 0x4094db
call fcn.00408c80
lea eax, [ebp - 0x41c]
push eax
call dword [0x433268]
jmp 0x4094ec
call fcn.00408c80
lea eax, [ebp - 0x41c]
push eax
call fcn.00409950
add esp, 4
cmp dword [ebp - 0x408], 0x10
jb 0x409506
push dword [ebp - 0x41c]
call fcn.0040be2b
add esp, 4
cmp dword [ebp - 0x420], 0x10
jb 0x40951d
push dword [ebp - 0x434]
call fcn.0040be2b
add esp, 4
push dword [esi + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea esi, [ebx + 0x50]
mov ecx, esi
call fcn.00408430
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.0040b500
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040b645
mov esp, ebp
pop ebp
ret