Function at 0x4aaf00
Capabilities:
Access peb ldr_data
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ec540
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [0x53d100]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x30]
mov ecx, 0x5a4d
mov dword [esi + 0xc], eax
cmp word [eax], cx
je 0x4aafec
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4aaf4d
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x4aaf62
cmp eax, 0xffffffff
je 0x4aaf62
push eax
call edi
mov edx, dword [esi + 0x30]
push edx
mov dword [esi], 0xffffffff
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call fcn.004bc4b7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4aaf8c
push 0x80004005
call fcn.00422000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov ecx, str.Incorrect_PE_file__e_magic___IMAGE_DOS_SIGNATURE_
mov dword [ebp - 4], 0
test ecx, 0xffff0000
jne 0x4aafca
mov edx, ecx
movzx esi, dx
push esi
call fcn.004c463d
test eax, eax
je 0x4aafd7
push esi
push eax
lea ecx, [ebp - 0x10]
call fcn.00424e82
jmp 0x4aafd7
push str.Incorrect_PE_file__e_magic___IMAGE_DOS_SIGNATURE_
lea ecx, [ebp - 0x10]
call fcn.0042d0b5
push 0x52c0b4
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.004d238c
mov ecx, dword [eax + 0x3c]
xor edx, edx
lea edi, [ecx + 0xf8]
cmp edx, dword [esi + 0x2c]
jb 0x4ab059
ja 0x4ab003
cmp edi, dword [esi + 0x28]
jb 0x4ab059
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4ab013
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x4ab028
cmp eax, 0xffffffff
je 0x4ab028
push eax
call edi
cmp dword [esi + 0x34], 0
mov dword [esi], 0xffffffff
je 0x4ab03e
mov ecx, dword [esi + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push str.Incorrect_PE_file__header___filesize_
lea ecx, [ebp - 0x10]
call fcn.0043aecb
push 0x52c0b4
lea edx, [ebp - 0x10]
push edx
call fcn.004d238c
add ecx, eax
mov dword [esi + 0x40], ecx
cmp dword [ecx], 0x4550
je 0x4ab104
push str.Incorrect_PE_file__incorrect_signature_
lea ecx, [ebp - 0x14]
call fcn.004247ea
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x40]
mov ecx, 0x454e
cmp word [eax], cx
jne 0x4ab0a6
push str.NE_executable
call fcn.004cb5ea
add esp, 4
push eax
push str.NE_executable
lea ecx, [ebp - 0x14]
call fcn.004253ae
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4ab0b6
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x4ab0cb
cmp eax, 0xffffffff
je 0x4ab0cb
push eax
call edi
cmp dword [esi + 0x34], 0
mov dword [esi], 0xffffffff
je 0x4ab0e1
mov edx, dword [esi + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
push eax
call fcn.0042541f
add eax, 0x10
add esp, 4
mov dword [ebp - 0x18], eax
push 0x52c0b4
lea eax, [ebp - 0x18]
push eax
call fcn.004d238c
add ecx, 0x18
xor eax, eax
mov dword [esi + 0x14], ecx
mov edx, 0x20b
cmp word [ecx], dx
sete al
mov ecx, eax
mov eax, dword [esi + 0x30]
mov dword [esi + 0x3c], ecx
test ecx, ecx
je 0x4ab136
mov ecx, dword [eax + 0x3c]
add eax, ecx
mov dword [esi + 0x44], eax
mov edx, dword [esi + 0x44]
add eax, 0x18
mov dword [esi + 0x18], eax
jmp 0x4ab139
mov edx, dword [esi + 0x40]
mov ax, word [edx + 6]
mov ecx, edx
add ecx, 4
cmp dword [esi + 0x3c], 0
mov dword [esi + 0x10], ecx
mov word [esi + 8], ax
je 0x4ab169
mov eax, dword [esi + 0x18]
add eax, 0x70
mov dword [esi + 0x1c], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14]
add eax, 0x60
mov dword [esi + 0x1c], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret