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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48cae0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x4c4074]
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 - 0x34], ecx
mov byte [ebp - 0x30], 0
test al, al
jne 0x420da7
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov al, 1
xchg byte [esi], al
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
call fcn.00403d50
mov ecx, eax
test ecx, ecx
je 0x4210e6
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 2
call fcn.00403d50
mov ecx, eax
test ecx, ecx
je 0x4210f0
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 0x4aa430
call fcn.004023a0
lea ecx, [ebp - 0x1c]
call fcn.00421100
mov byte [ebp - 4], 6
mov edx, dword [eax]
test edx, edx
je 0x420e39
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x420e20
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.004023a0
push 6
push str.__PID
lea ecx, [ebp - 0x14]
call fcn.004023a0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [ebp - 0x14]
call fcn.00420960
mov esi, eax
push 8
push str.Thread
mov ecx, esi
call fcn.004023a0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
mov ecx, esi
call fcn.00420960
mov esi, eax
push 2
push 0x4aa45c
mov ecx, esi
call fcn.004023a0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
test edx, edx
je 0x420eab
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x420e93
sub ecx, ebx
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.004023a0
mov eax, dword [esi]
mov ecx, dword [eax - 0x10]
lea esi, [eax - 0x10]
mov dword [ebp + 8], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x420ecf
cmp ecx, dword [esi]
jne 0x420ecf
lock inc dword [eax]
jmp 0x420efb
mov eax, dword [ecx]
lea ebx, [esi + 4]
push 2
push dword [ebx]
call dword [eax]
mov esi, eax
test esi, esi
je 0x4210fa
mov eax, dword [ebx]
lea ecx, [esi + 0x10]
mov dword [esi + 4], eax
mov edx, dword [ebx]
inc edx
push edx
push dword [ebp + 8]
call fcn.004024f0
add esp, 8
add esi, 0x10
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 9
or ebx, 0xffffffff
mov edx, dword [ebp - 0x1c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420f22
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
mov eax, ebx
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420f40
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [esi - 0x10]
lea edx, [edi - 0x10]
mov dword [ebp - 0x14], ecx
mov dword [ebp + 8], edx
cmp ecx, edx
je 0x420f97
cmp dword [edx + 0xc], 0
lea edi, [edx + 0xc]
jl 0x420f88
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x420f88
call fcn.004025a0
mov dword [ebp - 0x1c], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x420f80
mov esi, dword [ebp + 8]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
jmp 0x420f97
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
push esi
call fcn.00407350
mov edi, dword [ebp - 0x10]
mov eax, 0x78
mov ecx, 1
sub eax, dword [edi - 0xc]
test eax, eax
cmovle eax, ecx
lea ecx, [ebp - 0x18]
push eax
push 0x20
call fcn.0040a3e0
mov byte [ebp - 4], 0xe
lea edx, [ebp - 0x18]
push 0x4aa464
lea ecx, [ebp - 0x20]
call fcn.004215a0
add esp, 4
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x10]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.004023a0
mov byte [ebp - 4], 0xe
mov eax, ebx
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420ffb
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.004023a0
push 2
push 0x4aa3d4
lea ecx, [ebp - 0x10]
call fcn.004023a0
mov byte [ebp - 4], 0xb
mov eax, ebx
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x421039
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x14]
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x421054
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edi, dword [ebp - 0x24]
mov ecx, edi
call fcn.004211e0
mov eax, dword [edi + 0x30]
test eax, eax
je 0x42109b
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi - 0xc]
lea ecx, [ebp - 0x2c]
push 0
push ecx
add eax, eax
push eax
push esi
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4210b4
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x30]
test al, al
jne 0x4210d2
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
lea ecx, [ebp - 0x30]
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.004024c0
push 0x80004005
call fcn.004024c0
call fcn.004024e0
int3