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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x504f68]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + 4]
push 0xa
mov ecx, edi
call fcn.004905c0
mov ecx, edi
call fcn.0045fe20
lea eax, [ebp - 0x420]
lea ebx, [esi + 8]
push eax
mov ecx, ebx
call fcn.0046ab10
mov eax, dword [0x50d330]
test eax, eax
je 0x490706
mov edx, dword [esi + 0x84]
lea ecx, [ebp - 0x420]
push ecx
mov ecx, dword [esi + 0x8c]
push edx
mov edx, dword [esi + 0x88]
push ecx
mov ecx, dword [esi]
push edx
push ecx
call eax
add esp, 0x14
test al, al
je 0x490706
cmp dword [ebp - 0x408], 0x10
jb 0x490919
mov edx, dword [ebp - 0x41c]
push edx
jmp 0x490911
mov eax, dword [0x504050]
cmp eax, 2
je 0x49071c
cmp eax, 3
je 0x49071c
cmp dword [esi], 2
jl 0x490772
jmp 0x490738
cmp dword [ebp - 0x408], 0x10
mov eax, dword [ebp - 0x41c]
jae 0x490731
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 0x408], 0x10
mov eax, dword [ebp - 0x41c]
jae 0x49074d
lea eax, [ebp - 0x41c]
push eax
push 0x4e30dc
call fcn.004b6758
add eax, 0x40
push eax
call fcn.004b663c
call fcn.004b6758
add eax, 0x40
push eax
call fcn.004b65e0
add esp, 0x10
push 0
push 0
call fcn.00490250
mov eax, dword [0x504050]
add esp, 8
test eax, eax
je 0x490829
cmp eax, 2
je 0x490829
cmp dword [0x50d33c], 0
jne 0x4907ad
mov eax, dword [0x50d340]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4907b8
mov ecx, dword [0x50d338]
call fcn.004912f0
call fcn.004903e0
test al, al
je 0x490807
mov ecx, dword [0x50d320]
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x408], 0x10
mov eax, dword [ebp - 0x41c]
jae 0x4907e9
lea eax, [ebp - 0x41c]
mov ecx, dword [ebp - 0x40c]
push 0
lea edx, [ebp - 0x440]
push edx
mov edx, dword [0x50d320]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x50d33c], 0
jne 0x49081e
mov eax, dword [0x50d340]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x490829
mov ecx, dword [0x50d338]
call fcn.00491300
mov eax, dword [esi]
cmp eax, 4
jne 0x4908ae
mov ecx, dword [ebp - 0x40c]
mov eax, 0x400
cmp ecx, eax
jae 0x490841
mov eax, ecx
cmp dword [ebp - 0x408], 0x10
mov ecx, dword [ebp - 0x41c]
jae 0x490856
lea ecx, [ebp - 0x41c]
push eax
push ecx
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call fcn.004b37be
lea edx, [ebp - 0x404]
push edx
call fcn.0049e140
add esp, 0x14
call fcn.004a0c50
test al, al
je 0x490888
call fcn.004a0c60
jmp 0x490901
cmp dword [0x50d328], 0
je 0x490881
lea eax, [ebp - 0x43c]
push eax
mov ecx, ebx
call fcn.0046ab10
lea ecx, [ebp - 0x43c]
push ecx
call dword [0x50d328]
jmp 0x4908f3
cmp eax, 3
jne 0x490901
cmp dword [0x50d32c], 0
je 0x4908d9
lea edx, [ebp - 0x43c]
push edx
mov ecx, ebx
call fcn.0046ab10
lea eax, [ebp - 0x43c]
push eax
call dword [0x50d32c]
jmp 0x4908f3
lea ecx, [ebp - 0x43c]
push ecx
mov ecx, ebx
call fcn.0046ab10
lea edx, [ebp - 0x43c]
push edx
call fcn.00490010
add esp, 4
lea ecx, [ebp - 0x43c]
call fcn.00406d20
cmp dword [ebp - 0x408], 0x10
jb 0x490919
mov eax, dword [ebp - 0x41c]
push eax
call fcn.004b3716
add esp, 4
mov ecx, dword [esi + 0x90]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea esi, [edi + 0x4c]
mov ecx, esi
call fcn.004697e0
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.004a270e
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b3721
mov esp, ebp
pop ebp
ret