Function at 0x420460
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebx], 0
mov dword [ebx + 4], 0
cmp edi, 0x200
jb 0x4206b8
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x420533
mov ecx, dword [edx + 0x3c]
cmp ecx, 0x1000
jae 0x420533
lea eax, [ecx + 0x200]
cmp eax, edi
ja 0x420533
test cl, 7
jne 0x420533
add ecx, edx
cmp dword [ecx], 0x4550
jne 0x420533
movzx eax, word [ecx + 4]
cmp eax, 0x1c4
ja 0x4204ee
je 0x4204e7
sub eax, 0x14c
je 0x4204fc
sub eax, 0x74
je 0x4204e0
sub eax, 2
jne 0x420533
mov eax, 0x3030501
jmp 0x420508
mov eax, 0x3030701
jmp 0x420508
cmp eax, 0x200
je 0x420503
cmp eax, 0x8664
jne 0x420533
mov eax, 0x3030103
jmp 0x420508
mov eax, 0x3030401
mov esi, 0x400
cmp word [ecx + 0x14], si
ja 0x420533
movzx ecx, word [ecx + 0x18]
mov esi, 0x10b
cmp cx, si
je 0x4206a9
mov esi, 0x20b
cmp cx, si
je 0x4206a9
cmp edi, 0x200
jb 0x4206b8
cmp byte [edx + 6], 1
jne case.0x4205a8.4
cmp dword [edx], 0x464c457f
jne case.0x4205a8.4
movzx eax, byte [edx + 4]
sub eax, 1
je 0x420567
sub eax, 1
jne case.0x4205a8.4
movzx eax, byte [edx + 5]
sub eax, 1
je 0x420590
sub eax, 1
jne case.0x4205a8.4
movzx ecx, byte [edx + 0x12]
lea esi, [eax + 1]
movzx eax, byte [edx + 0x13]
shl cx, 8
or cx, ax
movzx eax, cx
jmp 0x420596
movzx eax, word [edx + 0x12]
xor esi, esi
movzx eax, ax
add eax, 0xfffffffe
cmp eax, 0x3c
ja case.0x4205a8.4
movzx eax, byte [eax + 0x420768]
jmp dword [eax*4 + 0x420754]
pop edi
mov eax, 0x3030103
mov dword [ebx], eax
mov eax, 1
pop esi
pop ebx
pop ebp
ret
pop edi
mov eax, 0x3030805
mov dword [ebx], eax
mov eax, 1
pop esi
pop ebx
pop ebp
ret
test esi, esi
je case.0x4205a8.4
pop edi
mov eax, 0x3030205
mov dword [ebx], eax
mov eax, 1
pop esi
pop ebx
pop ebp
ret
test esi, esi
jne case.0x4205a8.4
mov eax, 0x3030501
mov dword [ebx], eax
lea eax, [esi + 1]
pop edi
pop esi
pop ebx
pop ebp
ret
cmp edi, 0x200
jb 0x4206b8
mov eax, dword [edx]
cmp eax, 0xfeedface
ja 0x420629
je 0x420634
cmp eax, 0xcefaedfe
je 0x420622
cmp eax, 0xcffaedfe
jne 0x4206b8
mov ecx, 1
jmp 0x420636
cmp eax, 0xfeedfacf
jne 0x4206b8
xor ecx, ecx
mov eax, dword [edx + 4]
test ecx, ecx
je 0x42063f
bswap eax
cmp eax, 0x12
ja 0x42066b
je 0x420677
sub eax, 7
je 0x420682
sub eax, 5
je 0x420660
sub eax, 2
jne 0x4206b8
test ecx, ecx
je 0x4206b8
mov eax, 0x3030805
jmp 0x420687
test ecx, ecx
jne 0x4206b8
mov eax, 0x3030501
jmp 0x420687
sub eax, 0x1000007
je 0x420682
sub eax, 0xb
jne 0x4206b8
test ecx, ecx
je 0x4206b8
mov eax, 0x3030205
jmp 0x420687
mov eax, 0x3030103
mov edi, dword [edx + 0x10]
test ecx, ecx
je 0x420690
bswap edi
mov esi, dword [edx + 0x14]
test ecx, ecx
je 0x420699
bswap esi
cmp esi, 0x1000000
ja 0x4206b5
cmp edi, 0x40000
ja 0x4206b5
pop edi
mov dword [ebx], eax
mov eax, 1
pop esi
pop ebx
pop ebp
ret
mov edi, dword [ebp + 0xc]
cmp edi, 0x2c
jb 0x420737
cmp dword [edx], 0x46464952
jne 0x420737
cmp dword [edx + 8], 0x45564157
jne 0x420737
cmp dword [edx + 0xc], 0x20746d66
jne 0x420737
mov ecx, dword [edx + 0x10]
lea eax, [ecx - 0x10]
cmp eax, 2
ja 0x420737
cmp word [edx + 0x14], 1
jne 0x420737
movzx eax, word [edx + 0x22]
test al, 7
jne 0x420737
movzx edi, word [edx + 0x16]
shr eax, 3
imul edi, eax
test edi, edi
je 0x420737
cmp edi, 0x100
ja 0x420737
add ecx, 0x14
xor esi, esi
lea esp, [esp]
lea eax, [ecx + 8]
cmp eax, dword [ebp + 0xc]
ja 0x420737
cmp dword [ecx + edx], 0x61746164
je 0x42073e
mov eax, dword [ecx + edx + 4]
cmp eax, 0x10000
ja 0x420737
add ecx, 8
inc esi
add ecx, eax
cmp esi, 0xa
jl 0x420710
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
mov dword [ebx + 4], edi
mov eax, 1
pop edi
pop esi
mov dword [ebx], 3
pop ebx
pop ebp
ret