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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x4d2714]
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.00410760
mov ecx, edi
call fcn.004035a0
lea eax, [ebp - 0x420]
lea ebx, [esi + 8]
push eax
mov ecx, ebx
call fcn.0040fb50
mov eax, dword [0x4d4898]
test eax, eax
je 0x410956
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 0x410956
cmp dword [ebp - 0x408], 0x10
jb 0x410b69
mov edx, dword [ebp - 0x41c]
push edx
jmp 0x410b61
mov eax, dword [0x4d2024]
cmp eax, 2
je 0x41096c
cmp eax, 3
je 0x41096c
cmp dword [esi], 2
jl 0x4109c2
jmp 0x410988
cmp dword [ebp - 0x408], 0x10
mov eax, dword [ebp - 0x41c]
jae 0x410981
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 0x408], 0x10
mov eax, dword [ebp - 0x41c]
jae 0x41099d
lea eax, [ebp - 0x41c]
push eax
push 0x493034
call fcn.0042585e
add eax, 0x40
push eax
call fcn.004251a7
call fcn.0042585e
add eax, 0x40
push eax
call fcn.004243f1
add esp, 0x10
push 0
push 0
call fcn.0040fd30
mov eax, dword [0x4d2024]
add esp, 8
test eax, eax
je 0x410a79
cmp eax, 2
je 0x410a79
cmp dword [0x4d48a4], 0
jne 0x4109fd
mov eax, dword [0x4d48a8]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x410a08
mov ecx, dword [0x4d48a0]
call fcn.00415f10
call fcn.0040fec0
test al, al
je 0x410a57
mov ecx, dword [0x4d4888]
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 0x410a39
lea eax, [ebp - 0x41c]
mov ecx, dword [ebp - 0x40c]
push 0
lea edx, [ebp - 0x440]
push edx
mov edx, dword [0x4d4888]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x4d48a4], 0
jne 0x410a6e
mov eax, dword [0x4d48a8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x410a79
mov ecx, dword [0x4d48a0]
call fcn.00415f20
mov eax, dword [esi]
cmp eax, 4
jne 0x410afe
mov ecx, dword [ebp - 0x40c]
mov eax, 0x400
cmp ecx, eax
jae 0x410a91
mov eax, ecx
cmp dword [ebp - 0x408], 0x10
mov ecx, dword [ebp - 0x41c]
jae 0x410aa6
lea ecx, [ebp - 0x41c]
push eax
push ecx
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call fcn.00423067
lea edx, [ebp - 0x404]
push edx
call fcn.00417f40
add esp, 0x14
call fcn.00417b80
test al, al
je 0x410ad8
call fcn.00417b90
jmp 0x410b51
cmp dword [0x4d4890], 0
je 0x410ad1
lea eax, [ebp - 0x43c]
push eax
mov ecx, ebx
call fcn.0040fb50
lea ecx, [ebp - 0x43c]
push ecx
call dword [0x4d4890]
jmp 0x410b43
cmp eax, 3
jne 0x410b51
cmp dword [0x4d4894], 0
je 0x410b29
lea edx, [ebp - 0x43c]
push edx
mov ecx, ebx
call fcn.0040fb50
lea eax, [ebp - 0x43c]
push eax
call dword [0x4d4894]
jmp 0x410b43
lea ecx, [ebp - 0x43c]
push ecx
mov ecx, ebx
call fcn.0040fb50
lea edx, [ebp - 0x43c]
push edx
call fcn.0040f9d0
add esp, 4
lea ecx, [ebp - 0x43c]
call fcn.00401a50
cmp dword [ebp - 0x408], 0x10
jb 0x410b69
mov eax, dword [ebp - 0x41c]
push eax
call fcn.0042305c
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.0040f710
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.00422997
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004235d5
mov esp, ebp
pop ebp
ret