Function at 0x522598
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe6c
push ebx
mov dword [ebp - 0x30], edx
mov dword [ebp - 4], eax
mov byte [ebp - 0x35], 0
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x14]
lea edx, [ebp - 0x8c]
mov ecx, 0x40
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp eax, 0x40
jne 0x5225db
cmp word [ebp - 0x8c], 0x5a4d
je 0x5225f3
push 1
mov ecx, 0x2a96
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521eb8
call fcn.00404f00
xor ecx, ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x14]
lea edx, [ebp - 0x184]
mov ecx, 0xf8
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp eax, 0xf8
jne 0x522626
cmp dword [ebp - 0x184], 0x4550
je 0x52263e
push 1
mov ecx, 0x2a96
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521eb8
call fcn.00404f00
cmp dword [ebp - 0xfc], 0
je 0x522650
cmp dword [ebp - 0xf8], 0
jne 0x52266a
push 1
mov ecx, 0x522890
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521e64
call fcn.00404f00
jmp 0x522673
mov eax, dword [ebp - 0xfc]
mov dword [ebp - 0x3c], eax
movzx eax, word [ebp - 0x17e]
dec eax
test eax, eax
jl 0x5226cd
inc eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x34], 0
lea edx, [ebp - 0x2c]
mov ecx, 0x28
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp eax, 0x28
je 0x5226b7
push 1
mov ecx, 0x5228bc
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521e64
call fcn.00404f00
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x3c]
jne 0x5226c5
mov byte [ebp - 0x35], 1
jmp 0x5226cd
inc dword [ebp - 0x34]
dec dword [ebp - 0x44]
jne 0x52268a
cmp byte [ebp - 0x35], 0
jne 0x5226eb
push 1
mov ecx, 0x522890
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521e64
call fcn.00404f00
xor ecx, ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x14]
push ebp
lea eax, [ebp - 0x194]
xor edx, edx
call fcn.005223c8
pop ecx
test al, al
jne 0x522723
push 1
mov ecx, 0x5228f0
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521e64
call fcn.00404f00
mov dl, 1
mov eax, dword [0x419c10]
call fcn.00404704
mov dword [ebp - 0x40], eax
xor eax, eax
push ebp
push 0x522861
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x58]
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 4]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
cmp word [eax + 2], 1
jne 0x522771
mov eax, dword [ebp - 0x48]
cmp word [eax + 4], 1
jb 0x522771
mov eax, dword [ebp - 0x48]
cmp word [eax], 0
je 0x522789
push 1
mov ecx, 0x522920
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521e64
call fcn.00404f00
mov eax, dword [ebp - 0x48]
movzx eax, word [eax + 4]
dec eax
test eax, eax
jl 0x52284b
inc eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 4]
add eax, 6
mov edx, dword [ebp - 0x34]
shl edx, 4
add eax, edx
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 8]
cmp eax, dword [ebp - 0x190]
jne 0x52283f
mov eax, dword [ebp - 0x4c]
cmp byte [eax + 3], 0
jne 0x52283f
mov eax, dword [ebp - 0x4c]
mov edx, dword [eax + 0xc]
xor ecx, ecx
mov eax, dword [ebp - 0x40]
mov ebx, dword [eax]
call dword [ebx + 0x14]
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x194]
xor ecx, ecx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x14]
mov eax, dword [ebp - 0x190]
xor edx, edx
push edx
push eax
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 4]
call fcn.0041e550
push edx
push eax
mov eax, dword [ebp - 0x190]
cdq
cmp edx, dword [esp + 4]
jne 0x52281c
cmp eax, dword [esp]
pop edx
pop eax
je 0x522838
push 1
mov ecx, 0x522938
mov dl, 1
mov eax, dword [0x521ca4]
call fcn.00521e64
call fcn.00404f00
call fcn.00404fac
jmp 0x522880
inc dword [ebp - 0x34]
dec dword [ebp - 0x44]
jne 0x5227a4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x522868
mov eax, dword [ebp - 0x40]
call fcn.00404734
ret
pop ebx
mov esp, ebp
pop ebp
ret