Function at 0x4a2540
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1cc
mov eax, dword [0x50e018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x1cc], eax
mov eax, dword [ebp + 0xc]
push 4
push 0x1000
mov dword [ebp - 0x1c4], eax
add eax, 0x1b8
push eax
push 0
push edi
mov dword [ebp - 0x1c8], ecx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
jne 0x4a2599
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 8
push esi
mov esi, 0x40
push esi
lea edx, [ebp - 0xc4]
push 0
push edx
mov dword [ebp - 0x1c0], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1c0]
push ecx
push esi
lea edx, [ebp - 0xc4]
push edx
push ebx
mov eax, 0x5a4d
push edi
mov word [ebp - 0xc4], ax
mov dword [ebp - 0x88], esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4a27ef
cmp dword [ebp - 0x1c0], esi
jne 0x4a27ef
push 0xf8
lea eax, [ebp - 0x1bc]
push 0
push eax
lea esi, [ebx + 0x40]
call sub.MSVCR100.dll_memset
add esp, 0xc
lea edx, [ebp - 0x1c0]
push edx
mov eax, 1
push 0xf8
mov word [ebp - 0x1b6], ax
lea eax, [ebp - 0x1bc]
push eax
push esi
mov ecx, 0x10b
push edi
mov dword [ebp - 0x1bc], 0x4550
mov dword [ebp - 0x1a8], 0x200000e0
mov word [ebp - 0x1a4], cx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4a27ef
cmp dword [ebp - 0x1c0], 0xf8
jne 0x4a27ef
mov ecx, dword [str..detour]
mov edx, dword [0x4f0f8c]
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
add esi, 0xf8
mov dword [ebp - 0x44], ecx
lea ecx, [ebp - 0x1c0]
push ecx
mov eax, esi
sub eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
add eax, 0x28
push 0x28
mov dword [ebp - 0x40], edx
lea edx, [ebp - 0x44]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x1c4]
push edx
push esi
add eax, 0x58
push edi
mov dword [ebp - 0x34], eax
call ebx
test eax, eax
je 0x4a27ef
cmp dword [ebp - 0x1c0], 0x28
jne 0x4a27ef
push 0x40
lea eax, [ebp - 0x84]
push 0
push eax
add esi, 0x28
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0x1c4]
add esp, 0xc
mov ecx, 0x40
add eax, 0x58
lea edx, [ebp - 0x1c0]
push edx
push ecx
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x84]
push eax
push esi
push edi
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], 0x727444
mov dword [ebp - 0x7c], ecx
call ebx
test eax, eax
je 0x4a27ef
cmp dword [ebp - 0x1c0], 0x40
jne 0x4a27ef
mov ecx, dword [ebp - 0x1c4]
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
add ecx, 0x18
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1cc]
mov edx, dword [eax]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x14], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x1c0]
push ecx
push 0x18
mov dword [ebp - 0xc], edx
lea edx, [ebp - 0x1c]
push edx
add esi, 0x40
push esi
push edi
mov dword [ebp - 8], eax
call ebx
test eax, eax
je 0x4a27ef
cmp dword [ebp - 0x1c0], 0x18
jne 0x4a27ef
mov ecx, dword [ebp - 0x1c4]
mov edx, dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c0]
push eax
push ecx
push edx
add esi, 0x18
push esi
push edi
call ebx
test eax, eax
je 0x4a27ef
mov eax, dword [ebp - 0x1c4]
cmp dword [ebp - 0x1c0], eax
jne 0x4a27ef
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a665a
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004a665a
mov esp, ebp
pop ebp
ret 8