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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49d99d
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x4db064]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], ecx
mov al, byte [ecx + 0x18]
lea esi, [ecx + 0x18]
mov dword [ebp - 0x2c], ecx
mov byte [ebp - 0x28], 0
test al, al
jne 0x427357
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov al, 1
xchg byte [esi], al
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
call fcn.00404130
mov ecx, eax
test ecx, ecx
je 0x427675
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 2
call fcn.00404130
mov ecx, eax
test ecx, ecx
je 0x42767f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x14]
push 2
push 0x4be734
call fcn.004021c0
lea ecx, [ebp - 0x20]
call fcn.00427690
mov byte [ebp - 4], 6
mov edx, dword [eax]
test edx, edx
je 0x4273e9
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4273d0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.004021c0
push 6
push str.__PID
lea ecx, [ebp - 0x14]
call fcn.004021c0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [ebp - 0x14]
call fcn.00426e30
mov esi, eax
push 8
push str.Thread
mov ecx, esi
call fcn.004021c0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
mov ecx, esi
call fcn.00426e30
mov esi, eax
push 2
push 0x4be760
mov ecx, esi
call fcn.004021c0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
test edx, edx
je 0x42745b
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x427443
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.004021c0
push esi
lea ecx, [ebp - 0x1c]
call fcn.004023e0
mov byte [ebp - 4], 8
or edi, 0xffffffff
mov edx, dword [ebp - 0x20]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x427485
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4274a3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
call fcn.00408560
mov eax, dword [ebp - 0x10]
mov ecx, 0x78
sub ecx, dword [eax - 0xc]
mov eax, 1
test ecx, ecx
cmovle ecx, eax
push ecx
push 0x20
lea ecx, [ebp - 0x18]
call fcn.00409e90
mov byte [ebp - 4], 0xd
lea edx, [ebp - 0x18]
push 0x4be768
lea ecx, [ebp + 8]
call fcn.004287b0
add esp, 4
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x10]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.004021c0
mov byte [ebp - 4], 0xd
mov eax, edi
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x427516
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x10]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.004021c0
push 2
push 0x4bda6c
lea ecx, [ebp - 0x10]
call fcn.004021c0
mov byte [ebp - 4], 0xa
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x427554
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x427572
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x10]
mov eax, 0x80808081
mov ecx, dword [ebx - 0xc]
imul ecx
add edx, ecx
sar edx, 7
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp dword [ebx - 4], 1
mov dword [ebp + 8], esi
jle 0x4275a0
push ecx
lea ecx, [ebp - 0x10]
call fcn.00402080
mov ebx, dword [ebp - 0x10]
mov eax, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test esi, esi
jle 0x4275de
nop dword [eax]
movzx esi, word [ebx + 0x1fe]
xor ecx, ecx
push ebx
mov word [ebx + 0x1fe], cx
call eax
mov eax, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov word [ebx + 0x1fe], si
add ebx, 0x1fe
sub dword [ebp + 8], 1
jne 0x4275b0
or edi, 0xffffffff
cmp word [ebx], 0
je 0x4275e7
push ebx
call eax
mov esi, dword [ebp - 0x24]
mov ecx, esi
call fcn.00427770
mov eax, dword [esi + 0x34]
test eax, eax
je 0x427627
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x10]
lea edx, [ebp + 0x10]
push 0
push edx
mov ecx, dword [eax - 0xc]
add ecx, ecx
push ecx
push eax
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x427643
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x28]
test al, al
jne 0x427661
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
lea ecx, [ebp - 0x28]
xchg byte [ecx], al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.004022e0
push 0x80004005
call fcn.004022e0
int3