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

Disassembly:
push 0xffffffffffffffff
push 0x468078
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebp
push esi
push edi
mov eax, dword [0x48fac0]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov dword [esp + 0x18], ecx
cmp dword [0x491074], 0
je 0x40993e
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
lea eax, [esp + 0x1c]
push eax
call fcn.0044a53b
lea ecx, [esp + 0x20]
push ecx
call fcn.0044a517
add esp, 8
mov esi, eax
call fcn.00437eea
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x409779
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0xc]
push edx
mov edx, dword [esi + 0x10]
push eax
mov eax, dword [esi + 0x14]
push ecx
add edx, 1
push edx
movzx ecx, di
add eax, 0x76c
push eax
push ecx
shr edi, 0x10
push edi
lea edx, [esp + 0x30]
push str._04x:_04x__04d__02d__02d__02d:_02d:_02d
push edx
mov dword [esp + 0x54], 0
call fcn.00408b90
mov eax, dword [esp + 0x5c]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
add esp, 0x28
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.004035d0
mov edi, dword [esp + 0x10]
mov eax, dword [edi - 0xc]
mov ecx, dword [0x48e3f4]
cmp eax, ecx
jl 0x409847
add ecx, 0xfffffffb
push ecx
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x18]
call fcn.004088d0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 1
call fcn.004037f0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x2c], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409835
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x46dc34
lea ecx, [esp + 0x14]
call fcn.00405800
mov edi, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
call ebp
mov ecx, dword [esi + 0x14]
cmp ecx, dword [0x491070]
jne 0x409871
mov edx, dword [esi + 0x10]
cmp edx, dword [0x49106c]
jne 0x409871
mov eax, dword [esi + 0xc]
cmp eax, dword [0x491068]
je 0x40988c
mov ecx, dword [0x491064]
push ecx
call fcn.00449e4e
mov edx, dword [0x49107c]
push edx
call fcn.00409210
add esp, 8
push edi
lea ecx, [esp + 0x18]
call fcn.00409000
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 8]
mov esi, dword [edi - 0xc]
mov eax, 1
sub eax, dword [edx - 4]
mov byte [esp + 0x2c], 2
or ecx, eax
jge 0x4098c0
push 0
lea ecx, [esp + 0x18]
call fcn.00408660
mov edx, dword [esp + 0x14]
mov eax, dword [0x491064]
push eax
push 1
push esi
push edx
call fcn.00449ba1
mov ecx, dword [0x491064]
push ecx
call fcn.00449621
add esp, 0x14
cmp dword [0x491078], 0
je 0x4098ea
push edi
call ebp
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x2c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40991a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40993e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x20
ret 4