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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48b913
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x106c
call fcn.0047bf00
mov eax, dword [0x4a9070]
xor eax, esp
mov dword [esp + 0x1068], eax
push ebx
push esi
push edi
mov eax, dword [0x4a9070]
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 [0x4aea6c], edi
jne 0x42f375
test byte [0x4aeb44], 1
jne 0x42f34e
or dword [0x4aeb44], 1
mov dword [esp + 0x1088], edi
mov ecx, fcn.0042f2b2
mov edi, 0x4aeb28
call fcn.0042ef05
push 0x48da76
call fcn.0046fe99
or dword [esp + 0x108c], 0xffffffff
pop ecx
xor edi, edi
cmp dword [0x4aeb3c], edi
je 0x42f375
cmp dword [0x4aeb40], 8
mov eax, dword [0x4aeb2c]
jae 0x42f369
mov eax, 0x4aeb2c
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov dword [0x4aea6c], eax
cmp dword [ebp + 8], 4
mov esi, 0x4ae120
je 0x42f3f6
cmp word [0x4adf14], di
je 0x42f547
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4adf10]
cmp eax, edi
je 0x42f3a2
cmp eax, 0xffffffff
jne 0x42f3ef
mov edi, 0x4adf14
call fcn.0041dece
xor ebx, ebx
push ebx
push ebx
push 2
push ebx
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x4adf10], eax
cmp eax, 0xffffffff
je 0x42f540
push ebx
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]
xor edi, edi
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.004722d0
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 ebx, 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 ebx
mov eax, dword [ebp + 8]
add esp, 0x24
cmp eax, 1
jne 0x42f465
mov dword [esp + 0x10], 0x495378
jmp 0x42f498
cmp eax, 2
jne 0x42f474
mov dword [esp + 0x10], str.warn
jmp 0x42f498
cmp eax, 3
jne 0x42f483
mov dword [esp + 0x10], 0x495390
jmp 0x42f498
mov dword [esp + 0x10], str.prnt
cmp eax, 4
je 0x42f498
mov dword [esp + 0x10], str.unknown
cmp dword [esp + 0x14], edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
je 0x42f4ac
push dword [esp + 0x14]
call edi
jmp 0x42f4ae
xor eax, eax
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x42f4bb
mov eax, dword [0x4aea6c]
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 ebx
xor ebx, ebx
inc ebx
add esp, 0x20
cmp dword [ebp + 8], ebx
jbe 0x42f4fa
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp + 8], 4
je 0x42f547
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], ebx
call edi
add eax, eax
push eax
lea eax, [esp + 0x80]
push eax
push dword [0x4adf10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x1c], eax
call fcn.0042f150
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.0046fab6
mov esp, ebp
pop ebp
ret 0xc