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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4edbf0
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [0x541100]
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 0x4ac54c
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4ac4ad
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x4ac4c2
cmp eax, 0xffffffff
je 0x4ac4c2
push eax
call edi
mov edx, dword [esi + 0x30]
push edx
mov dword [esi], 0xffffffff
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call fcn.004bdbe3
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4ac4ec
push 0x80004005
call fcn.00420000
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 0x4ac52a
mov edx, ecx
movzx esi, dx
push esi
call fcn.004c5d7f
test eax, eax
je 0x4ac537
push esi
push eax
lea ecx, [ebp - 0x10]
call fcn.00422eb3
jmp 0x4ac537
push str.Incorrect_PE_file__e_magic___IMAGE_DOS_SIGNATURE_
lea ecx, [ebp - 0x10]
call fcn.0042b51c
push 0x52f95c
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.004d3abc
mov ecx, dword [eax + 0x3c]
xor edx, edx
lea edi, [ecx + 0xf8]
cmp edx, dword [esi + 0x2c]
jb 0x4ac5b9
ja 0x4ac563
cmp edi, dword [esi + 0x28]
jb 0x4ac5b9
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4ac573
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x4ac588
cmp eax, 0xffffffff
je 0x4ac588
push eax
call edi
cmp dword [esi + 0x34], 0
mov dword [esi], 0xffffffff
je 0x4ac59e
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.00439a19
push 0x52f95c
lea edx, [ebp - 0x10]
push edx
call fcn.004d3abc
add ecx, eax
mov dword [esi + 0x40], ecx
cmp dword [ecx], 0x4550
je 0x4ac664
push str.Incorrect_PE_file__incorrect_signature_
lea ecx, [ebp - 0x14]
call fcn.00422827
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x40]
mov ecx, 0x454e
cmp word [eax], cx
jne 0x4ac606
push str.NE_executable
call fcn.004ccd1a
add esp, 4
push eax
push str.NE_executable
lea ecx, [ebp - 0x14]
call fcn.00423404
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4ac616
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x4ac62b
cmp eax, 0xffffffff
je 0x4ac62b
push eax
call edi
cmp dword [esi + 0x34], 0
mov dword [esi], 0xffffffff
je 0x4ac641
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.00423475
add eax, 0x10
add esp, 4
mov dword [ebp - 0x18], eax
push 0x52f95c
lea eax, [ebp - 0x18]
push eax
call fcn.004d3abc
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 0x4ac696
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 0x4ac699
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 0x4ac6c9
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