Function at 0x4ae284
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x18], eax
mov edi, dword [ebp + 0xc]
xor eax, eax
push ebp
push 0x4ae4a3
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 4], eax
mov eax, 0x20
call sub.rtl250.bpl__System__GetMem_qqri
mov esi, eax
mov edx, 0x20
mov eax, esi
call fcn.00403818
mov ebx, esi
mov eax, dword [ebp + 8]
mov dword [ebx], eax
test edi, edi
setne al
mov byte [ebx + 0xc], al
test al, al
je 0x4ae2de
mov eax, dword [edi]
mov dword [ebx + 4], eax
mov eax, dword [edi + 4]
mov dword [ebx + 8], eax
mov edi, dword [ebx]
test edi, edi
je 0x4ae472
cmp edi, 0xffffffff
je 0x4ae472
push 0
push 0
push 0
push 4
push 0
push edi
call fcn.00402d9c
mov dword [ebx + 0x10], eax
cmp dword [ebx + 0x10], 0
je 0x4ae472
push 0
push 0
push 0
push 0xf001f
mov eax, dword [ebx + 0x10]
push eax
call fcn.004031b8
mov edi, eax
mov dword [ebx + 0x14], edi
test edi, edi
je 0x4ae472
cmp word [edi], 0x5a4d
jne 0x4ae472
mov edx, dword [ebx + 0x14]
mov eax, edx
add edx, 0x3c
add eax, dword [edx]
mov dword [ebx + 0x18], eax
cmp dword [eax], 0x4550
jne 0x4ae472
cmp word [eax + 0x18], 0x20b
jne 0x4ae374
lea edx, [eax + 0x18]
mov edx, dword [edx + 0x80]
mov dword [ebp - 0x14], edx
add eax, 0x18
add eax, 0xf0
mov dword [ebp - 8], eax
jmp 0x4ae388
mov edx, dword [eax + 0x88]
mov dword [ebp - 0x14], edx
add eax, 0x18
add eax, 0xe0
mov dword [ebp - 8], eax
push 2
call fcn.00403268
mov byte [ebp - 0xd], 0
mov eax, dword [ebx + 0x18]
movzx edi, word [eax + 6]
dec edi
test edi, edi
jl 0x4ae3e2
inc edi
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0xc]
lea edx, [edx + edx*4]
mov ecx, dword [ebp - 8]
lea edx, [ecx + edx*8]
mov ecx, 0
call sub.rtl250.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x18]
mov ecx, dword [0x4cd7e4]
mov ecx, dword [ecx]
mov eax, 0x4ae4c4
call ecx
test al, al
je 0x4ae3dc
mov byte [ebp - 0xd], 1
jmp 0x4ae3e2
inc dword [ebp - 0xc]
dec edi
jne 0x4ae3a7
cmp byte [ebp - 0xd], 0
jne 0x4ae472
mov eax, dword [ebx + 0x18]
movzx edi, word [eax + 6]
dec edi
test edi, edi
jl 0x4ae472
inc edi
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*8 + 0xc]
cmp eax, dword [ebp - 0x14]
jne 0x4ae46c
cmp dword [ebp + 0x10], 0
je 0x4ae442
mov edx, dword [0x4ad468]
mov eax, 0x2c
call sub.rtl250.bpl__System__New_qqripv
mov edi, eax
mov dword [ebx + 0x1c], edi
mov eax, edi
mov edx, 0x2c
call fcn.00403818
mov eax, dword [ebx + 0x1c]
mov byte [eax + 0x14], 1
jmp 0x4ae467
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + eax*8 + 0xc]
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov edx, dword [edx + eax*8 + 0x14]
mov eax, dword [ebx + 0x14]
call fcn.004ad980
mov dword [ebx + 0x1c], eax
mov dword [ebp - 4], esi
jmp 0x4ae472
inc dword [ebp - 0xc]
dec edi
jne 0x4ae400
cmp dword [ebp - 4], 0
jne 0x4ae48d
call fcn.00402fc0
mov ebx, eax
push 0xffffffffffffffff
push esi
call fcn.004ae598
push ebx
call fcn.00403268
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4ae4aa
lea eax, [ebp - 0x18]
call sub.rtl250.bpl__System__LStrClr_qqrpv
ret