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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43e4a4
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x106c
call fcn.0042f9e0
mov eax, dword [0x44d060]
xor eax, esp
mov dword [esp + 0x1068], eax
push ebx
push esi
push edi
mov eax, dword [0x44d060]
xor eax, esp
push eax
lea eax, [esp + 0x1080]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
cmp dword [0x45253c], edi
jne 0x41c66a
test byte [0x452618], 1
jne 0x41c643
or dword [0x452618], 1
mov ecx, fcn.0041c5a9
mov ebx, 0x4525fc
mov dword [esp + 0x1088], edi
call fcn.00408b59
push 0x43f5f0
call fcn.004245f1
or dword [esp + 0x108c], 0xffffffff
pop ecx
cmp dword [0x452610], edi
je 0x41c66a
cmp dword [0x452614], 8
mov eax, dword [0x452600]
jae 0x41c65e
mov eax, 0x452600
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov dword [0x45253c], eax
cmp dword [ebp + 8], 4
mov esi, 0x451a60
je 0x41c6e9
cmp word [0x451854], di
je 0x41c838
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x451850]
cmp eax, edi
je 0x41c697
cmp eax, 0xffffffff
jne 0x41c6e2
mov ebx, 0x451854
mov ecx, ebx
call fcn.0040a4d8
push edi
push edi
push 2
push edi
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x451850], eax
cmp eax, 0xffffffff
je 0x41c831
push edi
lea ecx, [esp + 0x24]
push ecx
push 2
lea ecx, [esp + 0x1c]
push ecx
push eax
mov byte [esp + 0x24], 0xff
mov byte [esp + 0x25], 0xfe
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
push 0x3e
mov word [esp + 0x38], ax
lea eax, [esp + 0x3a]
push edi
push eax
call fcn.00426910
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x30]
push eax
movzx eax, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x34]
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
push eax
movzx eax, word [esp + 0x36]
push eax
movzx eax, word [esp + 0x36]
push eax
movzx eax, word [esp + 0x38]
push eax
push str._04d__02d__02d__02d:_02d:_02d
lea eax, [esp + 0x50]
push 0x20
push eax
call edi
mov eax, dword [ebp + 8]
add esp, 0x24
cmp eax, 1
jne 0x41c758
mov dword [esp + 0x10], str.info
jmp 0x41c78b
cmp eax, 2
jne 0x41c767
mov dword [esp + 0x10], str.warn
jmp 0x41c78b
cmp eax, 3
jne 0x41c776
mov dword [esp + 0x10], 0x44476c
jmp 0x41c78b
mov dword [esp + 0x10], str.prnt
cmp eax, 4
je 0x41c78b
mov dword [esp + 0x10], str.unknown
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
xor eax, eax
cmp dword [esp + 0x14], eax
je 0x41c79f
push dword [esp + 0x14]
call ebx
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x41c7ac
mov eax, dword [0x45253c]
push dword [esp + 0x18]
push eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
lea eax, [esp + 0x44]
push eax
push str._s_thread_d__s__s:_s_r_n
lea eax, [esp + 0x8c]
push 0x800
push eax
call edi
xor edi, edi
inc edi
add esp, 0x20
cmp dword [ebp + 8], edi
jbe 0x41c7eb
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp + 8], 4
je 0x41c838
push esi
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x7c]
push eax
mov dword [esp + 0x1094], edi
call ebx
add eax, eax
push eax
lea eax, [esp + 0x80]
push eax
push dword [0x451850]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x1c], eax
call fcn.0041c432
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x1080]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1068]
xor ecx, esp
call fcn.004241ea
mov esp, ebp
pop ebp
ret 0xc