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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x4d04a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
push 0xa
lea ecx, [esi + 8]
call fcn.0040ad00
lea ecx, [esi + 8]
call fcn.00401a80
lea eax, [ebp - 0x420]
push eax
lea ecx, [esi + 0xc]
call fcn.0040b790
mov eax, dword [0x4d22cc]
test eax, eax
je 0x40ba63
mov edx, dword [esi + 0xa0]
lea ecx, [ebp - 0x420]
push ecx
mov ecx, dword [esi + 0xa8]
push edx
mov edx, dword [esi + 0xa4]
push ecx
mov ecx, dword [esi]
push edx
push ecx
call eax
add esp, 0x14
test al, al
je 0x40ba63
cmp dword [ebp - 0x40c], 0x10
jb 0x40bc77
mov edx, dword [ebp - 0x420]
push edx
jmp 0x40bc6f
mov eax, dword [section..data]
cmp eax, 2
je 0x40ba79
cmp eax, 3
je 0x40ba79
cmp dword [esi], 2
jl 0x40bacf
jmp 0x40ba95
cmp dword [ebp - 0x40c], 0x10
mov eax, dword [ebp - 0x420]
jae 0x40ba8e
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 0x40c], 0x10
mov eax, dword [ebp - 0x420]
jae 0x40baaa
lea eax, [ebp - 0x420]
push eax
push 0x48fd48
call fcn.00427777
add eax, 0x40
push eax
call fcn.00429664
call fcn.00427777
add eax, 0x40
push eax
call fcn.00427ab6
add esp, 0x10
push 0
push 0
call fcn.0040b560
mov eax, dword [section..data]
add esp, 8
test eax, eax
je 0x40bb86
cmp eax, 2
je 0x40bb86
cmp dword [0x4d22d8], 0
jne 0x40bb0a
mov eax, dword [0x4d22dc]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x40bb15
mov ecx, dword [0x4d22d4]
call fcn.00410470
call fcn.0040b6d0
test al, al
je 0x40bb64
mov ecx, dword [0x4d22bc]
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x40c], 0x10
mov eax, dword [ebp - 0x420]
jae 0x40bb46
lea eax, [ebp - 0x420]
mov ecx, dword [ebp - 0x410]
push 0
lea edx, [ebp - 0x440]
push edx
mov edx, dword [0x4d22bc]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x4d22d8], 0
jne 0x40bb7b
mov eax, dword [0x4d22dc]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40bb86
mov ecx, dword [0x4d22d4]
call fcn.00410480
mov eax, dword [esi]
cmp eax, 4
jne 0x40bc07
mov ecx, dword [ebp - 0x410]
mov eax, 0x400
cmp ecx, eax
jae 0x40bb9e
mov eax, ecx
cmp dword [ebp - 0x40c], 0x10
mov ecx, dword [ebp - 0x420]
jae 0x40bbb3
lea ecx, [ebp - 0x420]
push eax
push ecx
lea ecx, [ebp - 0x404]
push ecx
call fcn.00426830
lea edx, [ebp - 0x404]
push edx
call fcn.00412670
add esp, 0x10
call fcn.004122b0
test al, al
je 0x40bbe0
call fcn.004122c0
jmp 0x40bc5f
cmp dword [0x4d22c4], 0
je 0x40bbd9
lea eax, [ebp - 0x43c]
push eax
lea ecx, [esi + 0xc]
call fcn.0040b790
lea ecx, [ebp - 0x43c]
push ecx
call dword [0x4d22c4]
jmp 0x40bc44
cmp eax, 3
jne 0x40bc5f
cmp dword [0x4d22c8], 0
lea eax, [ebp - 0x43c]
lea ecx, [esi + 0xc]
push eax
je 0x40bc33
call fcn.0040b790
lea ecx, [ebp - 0x43c]
push ecx
call dword [0x4d22c8]
jmp 0x40bc44
call fcn.0040b790
lea ecx, [ebp - 0x43c]
push ecx
call fcn.0040a250
add esp, 4
cmp dword [ebp - 0x428], 0x10
jb 0x40bc5f
mov edx, dword [ebp - 0x43c]
push edx
call fcn.00426825
add esp, 4
cmp dword [ebp - 0x40c], 0x10
jb 0x40bc77
mov eax, dword [ebp - 0x420]
push eax
call fcn.00426825
add esp, 4
mov ecx, dword [esi + 0xac]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esi + 8]
mov eax, dword [edx + 4]
add esi, 0x58
mov dword [eax + esi - 0x50], 0x48fc8c
lea ecx, [esi - 0x4c]
mov dword [esi - 0x4c], 0x48fc50
call fcn.00409470
lea ecx, [esi - 0x4c]
call fcn.00409730
mov ecx, dword [esi - 0x50]
mov edx, dword [ecx + 4]
mov dword [edx + esi - 0x50], 0x48f648
push esi
mov dword [esi], 0x48f644
call fcn.00425fa1
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004271c4
mov esp, ebp
pop ebp
ret