Function at 0x40c64c
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x1c], ecx
push 8
pop eax
shl eax, 0
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + eax + 0x78]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 8]
add ecx, dword [eax]
mov dword [ebp - 0x10], ecx
mov byte [ebp - 1], 0
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x74], 0xc
jbe 0x40c6e0
push 8
pop eax
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + eax + 0x78]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x28]
push eax
push 4
mov eax, dword [ebp - 0x2c]
push dword [eax + 4]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 8]
add ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x40c6dc
push str.EEC3:_failed_to_unprotect_IAT_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
jmp 0x40c8a9
mov byte [ebp - 1], 1
jmp 0x40c6eb
mov eax, dword [ebp - 0x10]
add eax, 0x14
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0
je 0x40c85b
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
add ecx, dword [eax + 0xc]
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
add ecx, dword [eax + 0x10]
mov dword [ebp - 0x34], ecx
mov eax, dword [0x441a50]
and eax, 0x10
je 0x40c722
mov dword [ebp - 0x30], 2
jmp 0x40c729
mov dword [ebp - 0x30], 3
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x48], eax
push dword [ebp - 0x48]
push dword [ebp - 0x24]
call fcn.0040ef37
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40c76b
push str.EEC3:_failed_to_load_module:
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x43c910
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
jmp 0x40c8a9
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
add ecx, dword [eax]
mov dword [ebp - 0x18], ecx
and dword [ebp - 0xc], 0
jmp 0x40c783
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp dword [ecx + eax*4], 0
je 0x40c856
and dword [ebp - 0x14], 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + eax*4]
and eax, 0x80000000
je 0x40c7c4
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + eax*4]
and eax, 0xffff
push eax
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x14], eax
jmp 0x40c7e5
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
add edx, dword [ecx + eax*4]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
inc eax
inc eax
push eax
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40c811
push str.EEC3:_failed_to_resolve_function_from_module:
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x43c910
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
jmp 0x40c8a9
movzx eax, byte [ebp - 1]
test eax, eax
je 0x40c827
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x14]
mov dword [ecx + eax*4], edx
jmp 0x40c851
push dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x34]
lea eax, [ecx + eax*4]
push eax
call fcn.0040c5e7
pop ecx
pop ecx
movzx eax, al
test eax, eax
jne 0x40c851
push str.EEC3:_failed_to_write_protector_ptr_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
jmp 0x40c8a9
jmp 0x40c77c
jmp 0x40c6e2
movzx eax, byte [ebp - 1]
test eax, eax
je 0x40c8a7
push 8
pop eax
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + eax + 0x78]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
mov eax, dword [ebp - 0x38]
push dword [eax + 4]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 8]
add ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x40c8a7
push str.EEC3:_failed_to_change_protection_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
jmp 0x40c8a9
mov al, 1
leave
ret