Function at 0x4df0e0
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x168
mov eax, dword [0x572844]
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.0051de7f
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4df3ac
mov ecx, dword [ebx]
push esi
push edi
push 0
mov esi, dword [ecx + 0x10]
mov ecx, esi
push 0
push 0
call dword [0x541740]
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 [0x541740]
mov ecx, ebx
call esi
cmp eax, 0x40
jne 0x4df21a
cmp byte [esp + 0x6c], 0x4d
jne 0x4df21a
cmp byte [esp + 0x6d], 0x5a
jne 0x4df21a
mov eax, dword [ebx]
push 0
push 0
push dword [esp + 0xb0]
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x541740]
mov ecx, ebx
call esi
mov eax, dword [ebx]
push pe_nt_image_headers32
mov esi, dword [eax + 0xc]
lea eax, [esp + 0x70]
push eax
mov ecx, esi
call dword [0x541740]
mov ecx, ebx
call esi
cmp eax, 0x108
jne 0x4df21a
cmp byte [esp + 0x6c], 0x50
jne 0x4df21a
cmp byte [esp + 0x6d], 0x45
jne 0x4df21a
cmp byte [esp + 0x6e], 0
jne 0x4df21a
cmp byte [esp + 0x6f], 0
jne 0x4df21a
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x85]
cmp cl, 0xb
jne 0x4df21a
cmp al, 1
jne 0x4df1fe
cmp dword [esp + 0xe0], 4
jbe 0x4df1fe
mov edi, dword [esp + 0x104]
jmp 0x4df21c
cmp cl, 0xb
jne 0x4df21a
cmp al, 2
jne 0x4df21a
cmp dword [esp + 0xf0], 4
jbe 0x4df21a
mov edi, dword [esp + 0x114]
jmp 0x4df21c
xor edi, edi
mov ecx, ebx
call fcn.00481c30
mov ecx, edx
test ecx, ecx
jg 0x4df238
jl 0x4df232
cmp eax, 0x10000
jae 0x4df238
xor eax, eax
xor ecx, ecx
jmp 0x4df240
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 [0x541740]
mov ecx, ebx
call esi
mov eax, dword [ebx]
push 0x10000
push ebp
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x541740]
mov ecx, ebx
call esi
mov edx, eax
lea esi, [edx - 4]
test esi, esi
js 0x4df3a1
cmp dword [esi + ebp], 0x6054b50
jne 0x4df291
lea eax, [edx - 0x15]
cmp esi, eax
jl 0x4df29b
sub esi, 1
jns 0x4df281
jmp 0x4df3a1
movzx ecx, byte [esi + ebp + 0x15]
movzx eax, byte [esi + ebp + 0x14]
shl ecx, 8
add ecx, eax
je 0x4df3a1
sub edx, esi
add edx, 0xffffffea
cmp ecx, edx
jl 0x4df2bb
mov ecx, edx
mov eax, dword [esp + 0x10]
mov dword [eax], ecx
inc ecx
push ecx
call fcn.0051de7f
mov ecx, eax
add esp, 4
mov eax, dword [esp + 0x1c]
mov dword [eax], ecx
test edi, edi
je 0x4df380
mov eax, esi
cdq
add eax, dword [esp + 0x14]
adc edx, dword [esp + 0x18]
js 0x4df380
jg 0x4df2f6
cmp eax, edi
jb 0x4df380
xor eax, eax
mov dword [esp + 0x24], 0x54266c
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], 0x54266c
mov dword [esp + 0x2c], 0x54266c
mov dword [esp + 0x30], 0x54266c
mov dword [esp + 0x34], 0x54266c
mov dword [esp + 0x38], 0x54266c
mov dword [esp + 0x3c], 0x54266c
mov dword [esp + 0x68], 0x3a
mov dword [esp + 0x20], eax
mov dword [esp + 0x60], 1
call fcn.004b2040
mov eax, dword [esp + 0x10]
mov dword [eax], 0
jmp 0x4df3a1
mov ebx, dword [esp + 0x10]
lea eax, [ebp + 0x16]
add eax, esi
push dword [ebx]
push eax
push ecx
call fcn.0051f6b0
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.0051de88
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0x16c]
pop ebp
pop ebx
xor ecx, esp
call fcn.0051dca8
add esp, 0x168
ret 0xc