Function at 0x4edc10
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x168
mov eax, dword [0x58bb30]
xor eax, esp
mov dword [esp + 0x164], eax
mov eax, dword [esp + 0x170]
push ebx
mov ebx, dword [esp + 0x170]
push ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x17c]
push 0x10000
mov dword [esp + 0xc], eax
call fcn.0052f903
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4ededc
mov ecx, dword [ebx]
push esi
push edi
push 0
mov esi, dword [ecx + 0x10]
mov ecx, esi
push 0
push 0
call dword [0x55670c]
mov ecx, ebx
call esi
mov eax, dword [ebx]
push 0x40
mov esi, dword [eax + 0xc]
lea eax, [esp + 0x70]
push eax
mov ecx, esi
call dword [0x55670c]
mov ecx, ebx
call esi
cmp eax, 0x40
jne 0x4edd4a
cmp byte [esp + 0x6c], 0x4d
jne 0x4edd4a
cmp byte [esp + 0x6d], 0x5a
jne 0x4edd4a
mov eax, dword [ebx]
push 0
push 0
push dword [esp + 0xb0]
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x55670c]
mov ecx, ebx
call esi
mov eax, dword [ebx]
push 0x108
mov esi, dword [eax + 0xc]
lea eax, [esp + 0x70]
push eax
mov ecx, esi
call dword [0x55670c]
mov ecx, ebx
call esi
cmp eax, 0x108
jne 0x4edd4a
cmp byte [esp + 0x6c], 0x50
jne 0x4edd4a
cmp byte [esp + 0x6d], 0x45
jne 0x4edd4a
cmp byte [esp + 0x6e], 0
jne 0x4edd4a
cmp byte [esp + 0x6f], 0
jne 0x4edd4a
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x85]
cmp cl, 0xb
jne 0x4edd4a
cmp al, 1
jne 0x4edd2e
cmp dword [esp + 0xe0], 4
jbe 0x4edd2e
mov edi, dword [esp + 0x104]
jmp 0x4edd4c
cmp cl, 0xb
jne 0x4edd4a
cmp al, 2
jne 0x4edd4a
cmp dword [esp + 0xf0], 4
jbe 0x4edd4a
mov edi, dword [esp + 0x114]
jmp 0x4edd4c
xor edi, edi
mov ecx, ebx
call fcn.0048f0c0
mov ecx, edx
test ecx, ecx
jg 0x4edd68
jl 0x4edd62
cmp eax, 0x10000
jae 0x4edd68
xor eax, eax
xor ecx, ecx
jmp 0x4edd70
sub eax, 0x10000
sbb ecx, 0
mov esi, dword [ebx]
push 0
push ecx
mov dword [esp + 0x20], ecx
mov esi, dword [esi + 0x10]
mov ecx, esi
push eax
mov dword [esp + 0x20], eax
call dword [0x55670c]
mov ecx, ebx
call esi
mov eax, dword [ebx]
push 0x10000
push ebp
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x55670c]
mov ecx, ebx
call esi
mov edx, eax
lea esi, [edx - 4]
test esi, esi
js 0x4eded1
cmp dword [esi + ebp], 0x6054b50
jne 0x4eddc1
lea eax, [edx - 0x15]
cmp esi, eax
jl 0x4eddcb
sub esi, 1
jns 0x4eddb1
jmp 0x4eded1
movzx ecx, byte [esi + ebp + 0x15]
movzx eax, byte [esi + ebp + 0x14]
shl ecx, 8
add ecx, eax
je 0x4eded1
sub edx, esi
add edx, 0xffffffea
cmp ecx, edx
jl 0x4eddeb
mov ecx, edx
mov eax, dword [esp + 0x10]
mov dword [eax], ecx
inc ecx
push ecx
call fcn.0052f903
mov ecx, eax
add esp, 4
mov eax, dword [esp + 0x1c]
mov dword [eax], ecx
test edi, edi
je 0x4edeb0
mov eax, esi
cdq
add eax, dword [esp + 0x14]
adc edx, dword [esp + 0x18]
js 0x4edeb0
jg 0x4ede26
cmp eax, edi
jb 0x4edeb0
xor eax, eax
mov dword [esp + 0x24], 0x557718
mov dword [esp + 0x40], eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], eax
lea eax, [ebx + 0x32]
mov dword [esp + 0x28], 0x557718
mov dword [esp + 0x2c], 0x557718
mov dword [esp + 0x30], 0x557718
mov dword [esp + 0x34], 0x557718
mov dword [esp + 0x38], 0x557718
mov dword [esp + 0x3c], 0x557718
mov dword [esp + 0x68], 0x3a
mov dword [esp + 0x20], eax
mov dword [esp + 0x60], 1
call fcn.004bed70
mov eax, dword [esp + 0x10]
mov dword [eax], 0
jmp 0x4eded1
mov ebx, dword [esp + 0x10]
lea eax, [ebp + 0x16]
add eax, esi
push dword [ebx]
push eax
push ecx
call fcn.00531230
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [eax]
mov eax, dword [ebx]
mov byte [ecx + eax], 0
push ebp
call fcn.0052f90c
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0x16c]
pop ebp
pop ebx
xor ecx, esp
call fcn.0052f708
add esp, 0x168
ret 0xc