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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x42603c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
push esi
mov eax, 0xf9b748
push edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402971
sub eax, edx
sar eax, 1
cmp eax, 2
jb 0x402b7c
push 0x208
mov dword [ebp - 0x1c], 0
call fcn.004105df
push 0x208
mov esi, eax
push 0
push esi
call fcn.00413700
add esp, 0x10
lea ecx, [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
movzx edx, word [ebp - 0x12]
movzx ecx, word [ebp - 0x18]
push edx
mov ebx, eax
movzx eax, word [ebp - 0x16]
push eax
push ecx
push 0xf9b748
push str._s_04u_02u_02u.log
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
push 0x800
call fcn.004105df
push 0x800
mov edi, eax
push 0
push edi
call fcn.00413700
mov edx, dword [ebp - 0x20]
mov eax, dword [0xf99ee0]
movzx ecx, word [ebp - 0xa]
push edx
movzx edx, word [ebp - 0xc]
push 0xf9c270
push ebx
push eax
movzx eax, word [ebp - 0xe]
push ecx
movzx ecx, word [ebp - 0x10]
push edx
movzx edx, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x16]
push ecx
movzx ecx, word [ebp - 0x18]
push edx
movzx edx, word [0xf998c2]
push eax
movzx eax, word [0xf998c0]
push ecx
movzx ecx, word [0xf998be]
push edx
movzx edx, word [0xf998ba]
push eax
movzx eax, word [0xf998b8]
push ecx
push edx
cdq
mov ecx, 0x7d0
idiv ecx
push edx
push str.Build__02u_02u_02u_02u_02u___04u__02u__02u__02u:_02u:_02u__03u__u___u___s_
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x70
push 0xf998a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x8000080
push 3
push 0
push 1
push SysReAllocString
push esi
call ebx
cmp eax, 0xffffffff
jne 0x402ab0
push 0
push 0x8000080
push 1
push 0
push 1
push SysReAllocString
push esi
call ebx
mov dword [ebp - 0x1c], 1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.ab___ccsUNICODE
push esi
call fcn.0040fa31
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x402af8
push esi
call fcn.0040ff69
push edi
call fcn.0040ff69
add esp, 8
push 0xf998a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040f51e
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1c], 1
jne 0x402b17
push ebx
push 2
lea edx, [ebp - 0x1c]
push 1
push edx
mov word [ebp - 0x1c], 0xfeff
call fcn.004100cb
add esp, 0x10
jmp 0x402b24
push 2
push 0
push ebx
call fcn.00410433
add esp, 0xc
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402b30
sub eax, edx
push ebx
sar eax, 1
push eax
push 2
push edi
call fcn.004100cb
push ebx
call fcn.0041051c
add esp, 0x14
push 0xf998a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0xf99edc], 0
je 0x402b6d
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
call fcn.0040ff69
push esi
call fcn.0040ff69
add esp, 8
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0040f51e
mov esp, ebp
pop ebp
ret