Function at 0x87e648
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov edi, eax
mov eax, dword [ebp - 4]
call fcn.008738b8
mov eax, dword [ebp - 8]
call fcn.008738b8
mov eax, dword [ebp + 8]
call fcn.008738b8
xor eax, eax
push ebp
push 0x87e8ae
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0xc], eax
test edi, edi
je 0x87e88b
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, edi
mov esi, dword [eax + 0x3c]
add esi, edi
cmp word [eax], 0x5a4d
jne 0x87e88b
cmp dword [esi], 0x4550
jne 0x87e88b
mov eax, dword [esi + 0x80]
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
mov eax, esi
call fcn.0087e1e0
mov edx, eax
mov eax, edi
call fcn.0087e310
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x18]
mov eax, esi
call fcn.0087e1e0
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
add eax, edi
mov ebx, eax
jmp 0x87e6eb
add ebx, 0x14
add dword [ebp - 0x20], 0x14
push 0x14
push ebx
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x87e703
cmp dword [ebx + 0x10], 0
je 0x87e703
cmp dword [ebx + 0xc], 0
jne 0x87e6e4
add dword [ebp - 0x20], 0x28
mov eax, dword [ebp - 4]
call fcn.008736c8
mov ebx, eax
add ebx, dword [ebp - 0x20]
mov eax, dword [ebp - 8]
call fcn.008736c8
add ebx, eax
add ebx, 0xc
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp + 0xc]
push eax
push 1
mov eax, dword [ebp + 8]
call fcn.008738c8
mov edx, eax
mov ecx, dword [ebp - 0x24]
mov eax, edi
call fcn.0087e4b4
mov ebx, edi
add ebx, eax
test ebx, ebx
jbe 0x87e88b
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x24]
test eax, 0x80000000
jne 0x87e762
sub eax, 0x80000000
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0x24], eax
mov edx, dword [ebp - 0x24]
mov eax, ebx
call fcn.00874ff0
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 4]
call fcn.008736c8
push eax
lea eax, [ebp - 4]
call fcn.00873920
mov edx, eax
mov eax, ebx
pop ecx
call fcn.00874fe8
mov eax, dword [ebp - 4]
call fcn.008736c8
cdq
push edx
push eax
mov eax, ebx
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
add eax, 3
adc edx, 0
mov ebx, eax
mov eax, dword [ebp - 8]
call fcn.008736c8
push eax
lea eax, [ebp - 8]
call fcn.00873920
mov edx, eax
mov eax, ebx
pop ecx
call fcn.00874fe8
mov eax, dword [ebp - 8]
call fcn.008736c8
cdq
push edx
push eax
mov eax, ebx
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
add eax, 1
adc edx, 0
mov ebx, eax
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp - 8]
call fcn.008736c8
mov edx, ebx
sub edx, edi
sub edx, eax
sub edx, 3
mov eax, esi
call fcn.0087e248
mov dword [ebx], eax
add ebx, 4
xor eax, eax
mov dword [ebx], eax
add ebx, 4
mov edx, ebx
sub edx, edi
mov eax, esi
call fcn.0087e248
mov dword [esi + 0x80], eax
xor eax, eax
mov dword [esi + 0xd0], eax
xor eax, eax
mov dword [esi + 0xd4], eax
xor eax, eax
mov dword [esi + 0xd8], eax
xor eax, eax
mov dword [esi + 0xdc], eax
mov eax, dword [ebp - 0x18]
add eax, edi
mov ecx, dword [ebp - 0x20]
sub ecx, 0x28
mov edx, eax
mov eax, ebx
call fcn.00874fe8
add ebx, dword [ebp - 0x20]
sub ebx, 0x28
mov edx, dword [ebp - 0x14]
sub edx, edi
mov eax, esi
call fcn.0087e248
mov dword [ebx], eax
mov edx, dword [ebp - 0x10]
sub edx, edi
mov eax, esi
call fcn.0087e248
mov dword [ebx + 0xc], eax
mov edx, dword [ebp - 0x14]
sub edx, edi
mov eax, esi
call fcn.0087e248
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0xc], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x87e8b5
lea eax, [ebp - 8]
mov edx, 2
call fcn.00873438
lea eax, [ebp + 8]
call fcn.00873414
ret