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

Disassembly:
push 0xffffffffffffffff
push 0x423161
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], edi
lea esi, [edi + 4]
push 0xa
mov ecx, esi
mov dword [esp + 0x5c], 1
call fcn.0040c750
mov ecx, esi
call fcn.00406450
lea eax, [esp + 0x18]
push eax
mov ecx, esi
call fcn.0040a040
mov eax, dword [0x42b89c]
mov ebx, 2
mov byte [esp + 0x58], bl
test eax, eax
je 0x40c8aa
mov edx, dword [edi + 0x84]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [edi + 0x8c]
push edx
mov edx, dword [edi + 0x88]
push ecx
mov ecx, dword [edi]
push edx
push ecx
call eax
add esp, 0x14
test al, al
je 0x40c8aa
cmp dword [esp + 0x30], 0x10
mov byte [esp + 0x58], 1
jb 0x40ca5f
mov edx, dword [esp + 0x1c]
push edx
jmp 0x40ca57
mov eax, dword [0x42a300]
push ebp
mov ebp, 0x10
cmp eax, ebx
je 0x40c8c4
cmp eax, 3
je 0x40c8c4
cmp dword [edi], ebx
jl 0x40c90c
jmp 0x40c8d9
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x34], ebp
jae 0x40c8d2
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x34], ebp
jae 0x40c8e7
lea eax, [esp + 0x20]
push eax
push 0x424720
call fcn.004105c7
add eax, 0x40
push eax
call fcn.004104ab
call fcn.004105c7
add eax, 0x40
push eax
call fcn.0041044f
add esp, 0x10
push 0
push 0
call fcn.0040c170
mov eax, dword [0x42a300]
add esp, 8
test eax, eax
je 0x40c9bf
cmp eax, ebx
je 0x40c9bf
cmp dword [0x42b8a8], 0
jne 0x40c946
mov eax, dword [0x42b8ac]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x40c951
mov ecx, dword [0x42b8a4]
call fcn.0040d310
mov byte [esp + 0x5c], 3
call fcn.0040c360
test al, al
je 0x40c999
mov ecx, dword [0x42b88c]
push ebx
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x34], ebp
jae 0x40c97f
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x30]
push 0
lea edx, [esp + 0x1c]
push edx
mov edx, dword [0x42b88c]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x42b8a8], 0
mov byte [esp + 0x5c], bl
jne 0x40c9b4
mov eax, dword [0x42b8ac]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40c9bf
mov ecx, dword [0x42b8a4]
call fcn.0040d320
mov eax, dword [edi]
cmp eax, 4
jne 0x40c9f9
call fcn.0040d330
test al, al
je 0x40c9d6
call fcn.0040d340
jmp 0x40ca46
cmp dword [0x42b894], 0
je 0x40c9cf
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
call fcn.0040a040
push eax
mov byte [esp + 0x60], 4
call dword [0x42b894]
jmp 0x40ca36
cmp eax, 3
jne 0x40ca46
cmp dword [0x42b898], 0
mov ecx, esi
je 0x40ca21
lea edx, [esp + 0x38]
push edx
call fcn.0040a040
push eax
mov byte [esp + 0x60], 5
call dword [0x42b898]
jmp 0x40ca36
lea eax, [esp + 0x38]
push eax
call fcn.0040a040
push eax
mov byte [esp + 0x60], 6
call fcn.0040bdf0
add esp, 4
lea ecx, [esp + 0x38]
mov byte [esp + 0x5c], bl
call fcn.00402130
cmp dword [esp + 0x34], ebp
mov byte [esp + 0x5c], 1
pop ebp
jb 0x40ca5f
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0040e7b7
add esp, 4
mov edx, dword [edi + 0x90]
push edx
mov byte [esp + 0x20], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0xf
call dword [sym.imp.KERNEL32.dll_SetLastError]
add esi, 0x4c
mov ecx, esi
mov dword [esp + 0x58], 0xffffffff
call fcn.00408ee0
push esi
mov dword [esi], 0x424490
call fcn.0040e130
mov ecx, dword [esp + 0x54]
add esp, 4
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x50
ret