Function at 0x40c010
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e0bbf
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x51c240]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 8], ebx
je 0x40c256
push dword [edi + 0x10]
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x40c0c4
call fcn.00402e80
mov ecx, eax
test ecx, ecx
je 0x40c26c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 0x10]
lea eax, [ebp + 8]
push str.Open_process__d_failed__error___d_n
push eax
call fcn.00402d80
mov esi, dword [ebp + 8]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40c256
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40c256
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x40c0f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c256
call fcn.00402e80
mov ecx, eax
test ecx, ecx
je 0x40c276
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 1
call fcn.00402e80
mov ecx, eax
test ecx, ecx
je 0x40c280
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov eax, str.__full
mov byte [ebp - 4], 2
lea ecx, [ebp + 8]
test eax, 0xffff0000
jne 0x40c152
movzx eax, ax
push eax
call fcn.00403ab0
jmp 0x40c15e
push 6
push str.__full
call fcn.00403da0
mov ecx, dword [0x51eca0]
mov byte [ebp - 4], 3
test ecx, ecx
jne 0x40c1c2
push 0x51b148
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x51eca0], 0
jne 0x40c1b1
push 0x48
call fcn.0044dbb3
add esp, 4
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x40c19e
mov ecx, eax
call fcn.00404570
jmp 0x40c1a0
xor eax, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1c]
xor edx, edx
lock or dword [ecx], edx
mov dword [0x51eca0], eax
push 0x51b148
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x51eca0]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00404d00
mov edx, dword [ebp + 8]
or ebx, 0xffffffff
mov dword [ebp - 0x18], eax
add edx, 0xfffffff0
mov byte [ebp - 4], 1
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c1f3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x18], 0
mov ecx, 0x1967
push 0
push 0
push 0
mov eax, 0x1965
cmovne eax, ecx
push eax
push dword [ebp - 0x10]
mov eax, dword [edi + 8]
push dword [edi + 0x10]
push esi
call eax
push dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], eax
call edi
cmp dword [ebp - 0x18], 0
jne 0x40c231
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call edi
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40c253
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x18]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00402bc0
push 0x80004005
call fcn.00402bc0
push 0x80004005
call fcn.00402bc0
int3