Function at 0x406900
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x28
push ebx
push esi
lea esi, [ecx + 0x30]
push edi
push ebp
mov ebx, ecx
call fcn.00438350
mov ecx, dword [eax + 4]
call fcn.00421851
push 0x40
mov ecx, ebx
push esi
push 0
call fcn.00406750
test eax, eax
jne 0x406936
mov eax, 2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
cmp word [esi], 0x5a4d
je 0x40694a
mov eax, 3
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
lea esi, [ebx + 0x70]
push 0xf8
push esi
mov eax, dword [ebx + 0x6c]
push eax
mov ecx, ebx
call fcn.00406750
test eax, eax
jne 0x40696f
mov eax, 2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
cmp dword [esi], 0x4550
je 0x406984
mov eax, 0x11
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
cmp word [ebx + 0x88], 0x10b
je 0x40699c
mov eax, 0x16
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
cmp word [ebx + 0x74], 0x14c
je 0x4069b1
mov eax, 0x12
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov ax, word [ebx + 0x86]
test al, 2
jne 0x4069c9
mov eax, 3
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
test ah, 0x20
je 0x4069db
mov eax, 0x14
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
cmp word [ebx + 0xcc], 2
je 0x4069f2
mov eax, 0x15
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
xor eax, eax
mov ax, word [ebx + 0x84]
add eax, dword [ebx + 0x6c]
add eax, 0x18
mov dword [ebx + 0x168], eax
mov ax, word [ebx + 0x76]
mov cx, ax
imul cx, cx, 0x28
movzx eax, ax
mov word [ebx + 0x16c], cx
mov edx, eax
shl eax, 4
add eax, edx
shl eax, 2
push eax
call fcn.00420809
add esp, 4
mov dword [ebx + 0x170], eax
test eax, eax
jne 0x406a46
mov eax, 5
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov ecx, dword [ebx + 0x14]
push 0
mov eax, dword [ebx + 0x168]
mov ebp, dword [ecx]
push eax
call dword [ebp + 0x30]
xor bp, bp
cmp word [ebx + 0x76], bp
jbe 0x406b20
mov ecx, dword [ebx + 0x14]
push 0x28
lea eax, [esp + 0x14]
mov esi, dword [ecx]
push eax
call dword [esi + 0x3c]
cmp eax, 0x28
jne 0x406b37
movzx ecx, bp
mov eax, ecx
shl ecx, 4
add ecx, eax
lea esi, [esp + 0x10]
mov edi, dword [ebx + 0x170]
lea edx, [ecx*4]
mov ecx, 0xa
add edi, edx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x170]
mov dword [eax + edx + 0x28], esi
mov esi, dword [esp + 0x24]
mov eax, dword [ebx + 0x170]
mov dword [eax + edx + 0x30], esi
cmp dword [esp + 0x20], 0
jne 0x406ad3
mov eax, dword [ebx + 0x170]
mov dword [eax + edx + 0x34], 0
jmp 0x406aeb
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
cmp ecx, eax
jb 0x406ae1
mov ecx, eax
mov eax, dword [ebx + 0x170]
mov dword [eax + edx + 0x34], ecx
mov ecx, dword [ebx + 0x170]
inc bp
mov eax, dword [esp + 0x18]
mov dword [ecx + edx + 0x2c], eax
mov ecx, dword [ebx + 0x170]
mov word [ecx + edx + 0x38], 0
mov ecx, dword [ebx + 0x170]
mov dword [ecx + edx + 0x3c], 0
cmp word [ebx + 0x76], bp
ja 0x406a64
mov ecx, ebx
call fcn.00406d00
test ax, ax
je 0x406b44
movzx eax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov eax, 2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov ecx, ebx
call fcn.00406f30
test ax, ax
je 0x406b5b
movzx eax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov ecx, ebx
call fcn.00407250
test ax, ax
je 0x406b72
movzx eax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov ecx, ebx
call fcn.004076a0
test ax, ax
je 0x406b89
movzx eax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov ecx, dword [ebx + 0x14]
mov eax, dword [ecx]
call dword [eax + 0x38]
xor ecx, ecx
mov dword [ebx + 0x28], eax
mov cx, word [ebx + 0x76]
mov eax, ecx
shl ecx, 4
add ecx, eax
mov eax, dword [ebx + 0x170]
lea eax, [eax + ecx*4 - 0x44]
mov ecx, dword [eax + 0x14]
add ecx, dword [eax + 0x10]
mov dword [ebx + 0x2c], ecx
mov ecx, ebx
call fcn.00406740
call fcn.00438350
mov ecx, dword [eax + 4]
call fcn.00421864
mov ecx, ebx
call fcn.00409220
movzx ecx, ax
mov dword [ebx + 0xc], ecx
test ecx, ecx
je 0x406bf7
push 0x446ea0
mov ecx, dword [ebx + 0x14]
call fcn.004200e4
test eax, eax
jne 0x406bf7
mov eax, 0x10
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret