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

Disassembly:
sub esp, 0x44
mov eax, dword [0x441378]
xor eax, esp
mov dword [esp + 0x40], eax
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
cmp eax, dword [0x442d94]
jl 0x40f598
lea esi, [edi + 4]
push 0xa
mov ecx, esi
call fcn.004091c0
mov ecx, esi
call fcn.00406500
lea ecx, [esp + 0x2c]
lea esi, [edi + 8]
push ecx
mov ecx, esi
call fcn.0040e2a0
mov eax, dword [0x442dac]
test eax, eax
je 0x40f416
mov ecx, dword [edi]
lea edx, [esp + 0x2c]
push edx
push ecx
call eax
add esp, 8
test al, al
je 0x40f416
cmp dword [esp + 0x44], 0x10
jmp 0x40f589
mov eax, dword [0x44100c]
push ebx
mov ebx, 0x10
cmp eax, 2
je 0x40f432
cmp eax, 3
je 0x40f432
cmp dword [edi], 2
jl 0x40f47a
jmp 0x40f447
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x48], ebx
jae 0x40f440
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x48], ebx
jae 0x40f455
lea eax, [esp + 0x34]
push eax
push 0x4385ec
call fcn.0041df9f
add eax, 0x40
push eax
call fcn.0041de83
call fcn.0041df9f
add eax, 0x40
push eax
call fcn.0041de27
add esp, 0x10
push 0
push 0
call fcn.0040e710
mov eax, dword [0x44100c]
add esp, 8
test eax, eax
je 0x40f502
cmp eax, 2
je 0x40f502
lea ecx, [esp + 0xf]
call fcn.0040d5a0
call fcn.0040e8c0
test al, al
je 0x40f4df
mov eax, dword [0x442d9c]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x48], ebx
jae 0x40f4c6
lea eax, [esp + 0x34]
mov edx, dword [esp + 0x44]
push 0
lea ecx, [esp + 0x30]
push ecx
push edx
push eax
mov eax, dword [0x442d9c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x442db4], 0
jne 0x40f4f7
mov ecx, dword [0x442db8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40f502
mov ecx, dword [0x442db0]
call fcn.0040c580
mov eax, dword [edi]
cmp eax, 4
jne 0x40f53b
call fcn.00415ad0
test al, al
je 0x40f519
call fcn.00415ae0
jmp 0x40f584
cmp dword [0x442da4], 0
je 0x40f512
lea edx, [esp + 0x10]
push edx
mov ecx, esi
call fcn.0040e2a0
lea eax, [esp + 0x10]
push eax
call dword [0x442da4]
jmp 0x40f578
cmp eax, 3
jne 0x40f584
cmp dword [0x442da8], 0
je 0x40f562
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.0040e2a0
lea edx, [esp + 0x10]
push edx
call dword [0x442da8]
jmp 0x40f578
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.0040e2a0
lea ecx, [esp + 0x10]
push ecx
call fcn.0040e130
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00406e50
cmp dword [esp + 0x48], ebx
pop ebx
jb 0x40f598
mov edx, dword [esp + 0x30]
push edx
call fcn.0041c0d7
add esp, 4
mov eax, dword [edi + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 4]
lea esi, [edi + 0x50]
lea edi, [esi - 0x48]
mov dword [edx + esi - 0x4c], 0x438554
mov ecx, edi
mov dword [edi], 0x43851c
call fcn.0040d270
mov ecx, edi
call fcn.0040d6a0
mov eax, dword [edi - 4]
mov ecx, dword [eax + 4]
mov dword [ecx + edi - 4], 0x438e6c
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.0041bcb3
mov ecx, dword [esp + 0x4c]
add esp, 4
pop edi
pop esi
xor ecx, esp
call fcn.0041bf39
add esp, 0x44
ret