Function at 0x4972d8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00496dc8
mov eax, ebx
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov eax, ebx
call fcn.00421e48
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
cmp edx, 0
jne 0x497316
cmp eax, 0x40
jb 0x497532
jmp 0x49731c
jl 0x497532
mov eax, dword [ebp - 4]
mov byte [eax + 0x20], 1
mov eax, dword [ebp - 4]
mov esi, 0x40
mov dword [eax + 0x10], esi
mov eax, esi
call fcn.00403094
mov edi, eax
mov eax, dword [ebp - 4]
mov dword [eax + 4], edi
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
mov edx, edi
mov eax, ebx
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
mov dword [edx + 0x24], eax
cmp word [eax], 0x5a4d
jne 0x497514
mov esi, dword [eax + 0x3c]
add esi, 0xf8
mov eax, dword [ebp - 4]
add eax, 4
mov edx, esi
call fcn.004030c8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
mov dword [edx + 0x24], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, esi
sub ecx, eax
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add edx, eax
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 4]
mov dword [eax + 0x10], esi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 0x3c]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
lea eax, [edx + eax]
mov edx, dword [ebp - 4]
mov dword [edx + 0x28], eax
cmp dword [eax], 0x4550
jne 0x4974f4
movzx eax, word [eax + 6]
mov esi, eax
add esi, esi
add esi, esi
add esi, esi
lea esi, [esi + esi*4]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x10]
add edx, esi
mov eax, dword [ebp - 4]
add eax, 4
call fcn.004030c8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add edx, eax
mov ecx, esi
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 4]
add dword [eax + 0x10], esi
push ebp
call fcn.00497290
pop ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
mov edx, dword [eax + 0x88]
mov dword [ebp - 8], edx
movzx eax, word [eax + 6]
dec eax
test eax, eax
jl 0x49746a
inc eax
mov dword [ebp - 0xc], eax
xor eax, eax
lea edx, [eax + eax*4]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x2c]
mov edx, dword [ecx + edx*8 + 0x14]
lea ecx, [eax + eax*4]
mov edi, dword [ebp - 4]
mov edi, dword [edi + 0x2c]
add edx, dword [edi + ecx*8 + 0x10]
cmp esi, edx
jge 0x49744c
mov esi, edx
lea edx, [eax + eax*4]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x2c]
mov edx, dword [ecx + edx*8 + 0xc]
cmp edx, dword [ebp - 8]
jne 0x497464
mov edx, dword [ebp - 4]
mov dword [edx + 0x14], eax
inc eax
dec dword [ebp - 0xc]
jne 0x49742c
mov eax, dword [ebp - 4]
add eax, 4
mov edx, esi
call fcn.004030c8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, esi
sub ecx, eax
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add edx, eax
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 4]
mov dword [eax + 0x10], esi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
test eax, eax
jl 0x497532
lea eax, [eax + eax*4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x2c]
mov eax, dword [edx + eax*8 + 0x14]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
lea eax, [edx + eax]
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x2c]
mov eax, dword [edx + eax*8 + 0x10]
mov edx, dword [ebp - 4]
mov dword [edx + 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x2c]
mov eax, dword [edx + eax*8 + 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + 0x1c], eax
jmp 0x497532
mov eax, dword [ebp - 4]
call fcn.00496dc8
mov ecx, 0x497548
mov dl, 1
mov eax, dword [0x40a5fc]
call fcn.00410f18
call fcn.00404d0c
jmp 0x497532
mov eax, dword [ebp - 4]
call fcn.00496dc8
mov ecx, 0x49758c
mov dl, 1
mov eax, dword [0x40a5fc]
call fcn.00410f18
call fcn.00404d0c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret