Function at 0x10051340
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x18], ecx
push 1
mov ecx, dword [ebp - 4]
call fcn.10051740
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x24], 0
mov eax, dword [ebp - 4]
mov dword [eax + 0x28], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x20], 0
mov edx, dword [ebp - 4]
mov dword [edx + 0x1c], 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
cmp dword [ecx + 0x3c], 0
jle 0x10051417
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 0x3c]
cmp ecx, dword [ebp + 0xc]
jge 0x10051417
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
add edx, dword [eax + 0x3c]
mov eax, dword [ebp - 4]
mov dword [eax + 0x24], edx
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
add ecx, dword [edx + 0x3c]
mov edx, dword [ebp - 4]
mov dword [edx + 0x28], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
cmp dword [ecx + 0x3c], 0x40
jb 0x100513fe
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 0x3c]
sub ecx, 0x40
mov edx, dword [ebp - 4]
mov dword [edx + 0x20], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
add ecx, 0x40
mov edx, dword [ebp - 4]
mov dword [edx + 0x1c], ecx
jmp 0x10051417
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
cmp dword [ecx + 0x3c], 0x40
jae 0x10051417
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov dword [eax + 0x3c], 0x40
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
cmp dword [edx + 0x3c], 0
jne 0x1005148c
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
add ecx, 0x3c
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx - 0x24]
cmp dword [ebp - 0xc], ecx
jae 0x10051474
mov edx, dword [ebp - 0xc]
movzx eax, word [edx]
cmp eax, 0x14c
je 0x10051460
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx]
cmp edx, 0x8664
jne 0x10051469
mov eax, dword [ebp - 0xc]
sub eax, 4
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0xc], ecx
jmp 0x10051436
cmp dword [ebp - 0x18], 0
je 0x1005148c
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
sub eax, dword [edx + 0x18]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x3c], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
cmp dword [ecx + 0x3c], 0
jne 0x100515bb
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov eax, dword [ebp - 0x14]
lea ecx, [eax + edx - 0x3c]
cmp dword [ebp - 8], ecx
jae 0x100515bb
mov edx, dword [ebp - 8]
movzx eax, word [edx]
cmp eax, 0x14c
je 0x100514dd
mov ecx, dword [ebp - 8]
movzx edx, word [ecx]
cmp edx, 0x8664
jne 0x100514fa
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
add ecx, 4
cmp dword [ebp - 8], ecx
jb 0x100514fa
cmp dword [ebp - 0x10], 0
jne 0x100514fa
mov edx, dword [ebp - 8]
sub edx, 4
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
add eax, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 0x10], 0
je 0x100515b6
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
cmp edx, dword [ecx + 0x18]
jne 0x100515b6
mov dword [ebp - 0x1c], 0x40
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
push edx
call fcn.10248ee1
add esp, 4
mov eax, dword [ebp - 0x14]
push eax
call fcn.10248ee6
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
mov dword [ecx + 0x38], edx
mov eax, dword [ebp - 0x14]
push eax
push 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x38]
push edx
call fcn.1024a480
add esp, 0xc
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x38]
add ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.10054d50
add esp, 0xc
movzx edx, al
test edx, edx
je 0x100515b6
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x38]
mov dword [eax + 0x18], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x38]
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
sub eax, dword [edx + 0x18]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x3c], eax
jmp 0x100514ac
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
cmp dword [ecx + 0x3c], 0
je 0x1005161e
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
je 0x1005161e
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
add edx, dword [eax + 0x3c]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax + 0x18]
cmp ecx, 0x10b
je 0x10051607
mov edx, dword [ebp - 0x20]
movzx eax, word [edx + 0x18]
cmp eax, 0x20b
jne 0x1005161e
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov eax, 0x5a4d
mov word [edx], ax
mov ecx, dword [ebp - 0x20]
mov dword [ecx], 0x4550
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
cmp dword [eax + 0x3c], 0
je 0x100516af
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
add ecx, dword [edx + 0x3c]
mov edx, dword [ebp - 4]
mov dword [edx + 0x24], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
add eax, dword [ecx + 0x3c]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x28], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
add edx, dword [eax + 0x3c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
movzx eax, word [ecx + 0x14]
lea ecx, [edx + eax + 0x18]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x24]
movzx edx, word [eax + 6]
imul eax, edx, 0x28
add ecx, eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x4c], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
sub ecx, dword [edx + 0x4c]
push ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x4c]
push ecx
call fcn.10038ad0
add esp, 8
mov edx, dword [ebp - 4]
mov dword [edx + 0x48], eax
mov esp, ebp
pop ebp
ret 8