Function at 0x1004c16
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x100c028]
push ebx
xor ebx, ebx
push ebx
push 0x10000000
push 3
push ebx
push 3
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push 0x80000000
push eax
call dword [fcn.010020dc]
cmp eax, 0xffffffff
mov dword [ebp - 0x10c], eax
je 0x1004fc9
push esi
push edi
mov edi, dword [0x10020a4]
push ebx
lea ecx, [ebp - 0x100]
push ecx
mov esi, 0xf8
push esi
lea ecx, [ebp - 0xfc]
push ecx
push eax
call edi
test eax, eax
je 0x1004fbb
cmp dword [ebp - 0x100], esi
jne 0x1004fbb
cmp word [ebp - 0xfc], 0x5a4d
jne 0x1004ce0
push ebx
push ebx
push dword [ebp - 0xc0]
push dword [ebp - 0x10c]
call dword [fcn.010020a8]
cmp eax, dword [ebp - 0xc0]
jne 0x1004fbb
push ebx
lea eax, [ebp - 0x100]
push eax
push esi
lea eax, [ebp - 0xfc]
push eax
push dword [ebp - 0x10c]
call edi
test eax, eax
je 0x1004fbb
cmp dword [ebp - 0x100], esi
jne 0x1004fbb
cmp dword [ebp - 0xfc], 0x4550
jne 0x1004fbb
cmp word [ebp - 0xe8], 0xe0
jb 0x1004fbb
cmp dword [ebp - 0x64], ebx
je 0x1004fbb
cmp dword [ebp - 0x60], ebx
je 0x1004fbb
cmp dword [ebp - 0x60], 0x40000
ja 0x1004fbb
push dword [ebp - 0x60]
push 8
push dword [0x100d078]
call dword [fcn.01002118]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x114], esi
je 0x1004fbb
push ebx
push ebx
push dword [ebp - 0x64]
push dword [ebp - 0x10c]
call dword [fcn.010020a8]
cmp eax, dword [ebp - 0x64]
jne 0x1004fbb
push ebx
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x60]
push esi
push dword [ebp - 0x10c]
call edi
test eax, eax
je 0x1004fbb
mov ecx, dword [ebp - 0x60]
cmp dword [ebp - 0x100], ecx
jne 0x1004fbb
mov eax, esi
mov dword [ebp - 0x104], ecx
cmp ecx, 0x16
jmp 0x1004ddd
cmp byte [eax], 0xc0
jne 0x1004dcf
push 4
pop ecx
mov edi, 0x100223c
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x1004dcf
mov ecx, dword [eax + 0x10]
cmp ecx, 0x16
mov dword [ebp - 0x100], ecx
jb 0x1004dcf
cmp ecx, dword [ebp - 0x104]
ja 0x1004dcf
push ecx
push eax
push 0xffffffffffffffff
call fcn.01004be1
test eax, eax
je 0x1004dea
mov eax, dword [ebp - 0x108]
inc eax
dec dword [ebp - 0x104]
cmp dword [ebp - 0x104], 0x16
mov dword [ebp - 0x108], eax
jae 0x1004d91
jmp 0x1004fbb
mov ecx, dword [ebp - 0x108]
test cl, 3
je 0x1004e21
mov edi, dword [ebp - 0x114]
mov esi, edi
jmp 0x1004e0b
dec dword [ebp - 0x100]
mov al, byte [ecx]
mov byte [esi], al
inc esi
inc ecx
cmp dword [ebp - 0x100], ebx
jne 0x1004dff
dec dword [ebp - 0x100]
mov dword [ebp - 0x108], edi
mov ecx, edi
movzx edx, word [ecx + 0x14]
mov eax, dword [ecx + 0x10]
add eax, ecx
add ecx, 0x16
cmp edx, ebx
mov dword [ebp - 0x114], edx
mov dword [ebp - 0x11c], eax
je 0x1004fbb
mov edi, dword [0x1002114]
jmp 0x1004e55
mov ecx, dword [ebp - 0x108]
mov eax, dword [ebp - 0x11c]
mov edx, ecx
add ecx, 4
cmp ecx, eax
mov dword [ebp - 0x110], edx
ja 0x1004fbb
mov ax, word [edx]
test al, 1
jne 0x1004fbb
test byte [edx + 2], 1
jne 0x1004fbb
movzx edx, word [edx + 2]
movzx eax, ax
mov esi, ecx
add ecx, eax
mov dword [ebp - 0x118], ecx
add ecx, edx
cmp ecx, dword [ebp - 0x11c]
mov dword [ebp - 0x108], ecx
ja 0x1004fbb
mov ecx, dword [ebp - 0x118]
shr eax, 1
mov word [esi + eax*2 - 2], bx
mov eax, dword [ebp - 0x110]
movzx eax, word [eax + 2]
push 2
shr eax, 1
mov word [ecx + eax*2 - 2], bx
pop eax
sub esi, eax
mov word [esi], 0x5f
sub esi, eax
mov word [esi], 0x58
sub esi, eax
mov word [esi], 0x46
sub esi, eax
mov word [esi], 0x53
sub esi, eax
lea eax, [ebp - 0x104]
push eax
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push esi
push ebx
push ebx
mov word [esi], 0x5f
call edi
cmp eax, ebx
mov dword [ebp - 0x100], eax
je 0x1004faf
cmp dword [ebp - 0x104], ebx
jne 0x1004faf
push eax
push 8
push dword [0x100d078]
call dword [fcn.01002118]
cmp eax, ebx
mov dword [ebp - 0x110], eax
je 0x1004fbb
push ebx
push ebx
push dword [ebp - 0x100]
push eax
push 0xffffffffffffffff
push esi
push ebx
push ebx
call edi
push ebx
push ebx
push dword [ebp - 0x110]
call dword [0x1002110]
test eax, eax
jne 0x1004faf
lea eax, [ebp - 0x104]
push eax
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x118]
push ebx
push ebx
call edi
cmp eax, ebx
mov dword [ebp - 0x100], eax
je 0x1004faf
cmp dword [ebp - 0x104], ebx
jne 0x1004faf
push eax
push 8
push dword [0x100d078]
call dword [fcn.01002118]
mov esi, eax
cmp esi, ebx
je 0x1004fbb
push ebx
push ebx
push dword [ebp - 0x100]
push esi
push 0xffffffffffffffff
push dword [ebp - 0x118]
push ebx
push ebx
call edi
push esi
push dword [ebp - 0x110]
call dword [0x100210c]
dec dword [ebp - 0x114]
jne 0x1004e49
push dword [ebp - 0x10c]
call dword [0x10020d4]
pop edi
pop esi
mov ecx, dword [ebp - 4]
pop ebx
call fcn.01007eff
leave
ret 4