Function at 0x402d10
Capabilities:
Parse pe header

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
mov esi, dword [esp + 0x10]
xor edx, edx
mov word [ebx + 6], dx
mov word [ebx + 4], dx
mov word [ebx + 2], dx
mov word [ebx], dx
cmp word [esi], 0x5a4d
push edi
mov edi, esi
jne 0x402d42
cmp word [esi + 0x18], 0x40
jb 0x402d42
mov edi, dword [esi + 0x3c]
add edi, esi
mov ebp, dword [esp + 0x18]
cmp ebp, 0x5f8
jb 0x402f9d
cmp dword [edi], 0x4550
jne 0x402ec8
mov ax, word [edi + 0x44]
xor ebp, ebp
mov word [ebx], ax
mov ecx, dword [edi + 0x44]
shr ecx, 0x10
mov word [ebx + 2], cx
mov word [ebx + 4], dx
mov word [ebx + 6], dx
mov bp, word [edi + 6]
mov esi, dword [edi + 0x88]
cmp ebp, edx
je 0x402f9d
lea ecx, [edi + 0x100]
mov ebx, dword [ecx + 4]
mov eax, esi
sub eax, ebx
mov ebx, dword [ecx]
cmp eax, ebx
jb 0x402db2
cmp eax, dword [ecx + 8]
jb 0x402db2
inc edx
add ecx, 0x28
cmp edx, ebp
jne 0x402d91
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
lea edx, [edx + edx*4]
mov ecx, dword [edi + edx*8 + 0x10c]
test ecx, ecx
je 0x402f9d
mov ebx, dword [edi + 0x8c]
mov edx, dword [esp + 0x18]
add ecx, eax
lea eax, [ebx + ecx]
cmp edx, eax
jb 0x402f9d
sub ebx, 0x18
cmp ebx, 0x80000000
ja 0x402f9d
mov edx, dword [esp + 0x14]
xor eax, eax
add edx, ecx
xor ecx, ecx
mov cx, word [edx + 0xe]
mov ax, word [edx + 0xc]
add ecx, eax
lea eax, [ecx*8 - 8]
cmp ebx, eax
jb 0x402f9d
xor eax, eax
mov esi, ecx
dec ecx
test esi, esi
je 0x402f9d
lea esi, [edx + ecx*8 + 0x14]
inc ecx
cmp dword [esi - 4], 0x10
jne 0x402e27
mov eax, dword [esi]
dec ecx
sub esi, 8
test ecx, ecx
ja 0x402e1f
test eax, eax
je 0x402f9d
test eax, 0x80000000
je 0x402e6c
and eax, 0x7fffffff
cmp eax, ebx
ja 0x402f9d
xor ecx, ecx
xor esi, esi
mov cx, word [edx + eax + 0xe]
mov si, word [edx + eax + 0xc]
add ecx, esi
je 0x402f9d
mov eax, dword [edx + eax + 0x14]
test eax, 0x80000000
jne 0x402e3e
cmp eax, ebx
ja 0x402f9d
mov ebx, dword [edx + eax]
lea esi, [edx + eax]
xor edx, edx
test ebp, ebp
je 0x402f9d
lea ecx, [edi + 0x100]
mov eax, ebx
sub eax, dword [ecx + 4]
cmp eax, dword [ecx]
jb 0x402ea7
cmp eax, dword [ecx + 8]
jb 0x402ea7
inc edx
add ecx, 0x28
cmp edx, ebp
jne 0x402e8a
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
lea edx, [edx + edx*4]
mov edx, dword [edi + edx*8 + 0x10c]
test edx, edx
je 0x402f9d
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
add edx, eax
mov eax, dword [esi + 4]
jmp 0x402f34
cmp word [edi], 0x454e
jne 0x402f9d
xor edx, edx
add esi, ebp
mov dx, word [edi + 0x24]
add edx, edi
lea eax, [edx + 2]
cmp eax, esi
ja 0x402f9d
xor ecx, ecx
mov cx, word [edx]
mov dx, word [eax]
cmp dx, 0x8010
je 0x402f22
test dx, dx
je 0x402f9d
xor edx, edx
mov dx, word [eax + 2]
lea edx, [edx + edx*2]
lea eax, [eax + edx*4 + 8]
lea edx, [eax + 0xc]
cmp edx, esi
ja 0x402f9d
mov dx, word [eax]
cmp dx, 0x8010
jne 0x402ef7
xor esi, esi
xor edx, edx
mov si, word [eax + 0xa]
mov dx, word [eax + 8]
mov eax, esi
shl edx, cl
shl eax, cl
cmp edx, ebp
ja 0x402f9d
add eax, edx
cmp eax, ebp
ja 0x402f9d
mov eax, dword [esp + 0x14]
cmp ebp, 0x48
lea ecx, [edx + eax]
jb 0x402f9d
mov edx, 0xfeef04bd
cmp dword [ecx + 0x14], edx
je 0x402f7e
mov eax, dword [ecx + 0x28]
add ecx, 0x14
cmp eax, edx
je 0x402f7e
sub ecx, 0x14
xor eax, eax
mov ax, word [ecx]
test eax, eax
je 0x402f9d
cmp ebp, eax
jb 0x402f9d
sub ebp, eax
add ecx, eax
cmp ebp, 0x48
jae 0x402f4f
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov dx, word [ecx + 0x1e]
mov word [ebx], dx
mov ax, word [ecx + 0x1c]
mov word [ebx + 2], ax
mov dx, word [ecx + 0x22]
mov word [ebx + 4], dx
mov ax, word [ecx + 0x20]
mov word [ebx + 6], ax
pop edi
pop esi
pop ebp
pop ebx
ret 0xc