Function at 0x51e5f0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
mov ebx, edx
push esi
push edi
xor edi, edi
mov dword [esp + 0x14], ebx
mov edx, dword [ebx]
mov esi, ecx
mov eax, dword [ebx + 4]
cmp edx, 1
mov ecx, 0x64
mov dword [esp + 0x18], eax
cmove edi, ecx
mov dword [esp + 0x3c], esi
add edi, eax
mov al, byte [edi]
mov byte [ebx + 0x10], al
cmp al, 0xa
je 0x51e648
cmp al, 0xd
je 0x51e648
cmp al, 5
je 0x51e639
cmp al, 2
jne 0x51ea5c
mov dword [esp + 0x28], 0
mov eax, 0xc
jmp 0x51e655
mov dword [esp + 0x28], 1
mov eax, 8
lea ecx, [eax + 0x64]
cmp edx, 1
cmovne ecx, eax
movzx eax, byte [edi + 4]
mov dword [esp + 0x20], ecx
movzx ecx, byte [edi + 3]
mov dword [ebx + 0x24], 0
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x14], ecx
mov eax, dword [esi + 4]
movzx esi, byte [edi + 5]
movzx edx, byte [edi + 1]
shl esi, 8
mov eax, dword [eax + 0x24]
mov dword [esp + 0x24], eax
movzx eax, byte [edi + 6]
or esi, eax
shl edx, 8
movzx eax, byte [edi + 7]
add esi, eax
mov dword [esp + 0x44], ecx
lea eax, [ecx + ecx]
sub esi, eax
movzx eax, byte [edi + 2]
sub esi, dword [esp + 0x20]
or edx, eax
je 0x51e6fc
cmp edx, dword [esp + 0x24]
jge 0x51ea5c
mov eax, dword [esp + 0x18]
movzx ecx, byte [edx + eax + 2]
movzx eax, byte [edx + eax + 3]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x18]
add esi, ecx
movzx ecx, byte [edx + eax + 1]
movzx eax, byte [edx + eax]
shl eax, 8
or ecx, eax
lea eax, [edx + 4]
cmp ecx, eax
jae 0x51e6f2
test ecx, ecx
jne 0x51ea5c
mov edx, ecx
test ecx, ecx
jne 0x51e6b2
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0x28], 0
mov dword [ebx + 0x18], esi
je 0x51e70a
xor eax, eax
jmp 0x51e70f
mov eax, dword [edi + 8]
bswap eax
mov dword [ebx + 0x20], eax
test ecx, ecx
je 0x51ea3c
mov esi, dword [esp + 0x3c]
cmp byte [esi + 9], 0
je 0x51e734
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x51e734
mov ecx, esi
call fcn.00450c80
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x28]
sub ecx, dword [eax + 0x24]
add ecx, dword [esp + 0x24]
cmp byte [esi + 9], 0
mov dword [esp + 0x1c], ecx
je 0x51e758
add dword [esi + 0xc], 0xffffffff
jne 0x51e758
mov ecx, esi
call fcn.00450c60
mov eax, dword [ebx + 0x14]
inc eax
lea esi, [eax + eax*2]
shl esi, 3
call fcn.004e4f50
test eax, eax
je 0x51e77e
mov dword [ebx + 0x1c], 0
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push esi
call fcn.0043b050
mov edx, eax
add esp, 8
mov dword [ebx + 0x1c], edx
test edx, edx
je 0x51e772
mov ecx, dword [ebx + 0x14]
inc ecx
lea eax, [ecx + ecx*2]
shl eax, 3
push eax
push 0
push edx
call fcn.00570cd0
xor eax, eax
add esp, 0xc
mov dword [esp + 0x40], eax
cmp dword [ebx + 0x14], eax
jle 0x51ea3c
mov edx, dword [esp + 0x18]
xor edi, edi
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x44], edi
mov ebx, dword [ebx + 0x1c]
lea eax, [ecx + eax*2]
add ebx, edi
movzx edi, byte [eax + edx + 1]
movzx eax, byte [eax + edx]
shl eax, 8
or edi, eax
cmp edi, ecx
jb 0x51ea58
cmp edi, dword [esp + 0x24]
jge 0x51ea58
cmp dword [esp + 0x28], 0
jne 0x51e7ff
mov eax, dword [edi + edx]
add edi, 4
bswap eax
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x14]
mov al, byte [eax + 0x10]
mov byte [esp + 0x13], al
cmp al, 5
je 0x51ea1b
cmp byte [edi + edx], 0x80
lea ecx, [edi + edx]
movzx esi, byte [ecx]
jae 0x51e822
mov al, 1
jmp 0x51e872
movzx edx, byte [ecx + 1]
test dl, dl
js 0x51e836
and esi, 0x7f
mov al, 2
shl esi, 7
or esi, edx
jmp 0x51e86e
movzx eax, byte [ecx + 2]
shl esi, 0xe
or eax, esi
test al, al
js 0x51e856
mov esi, edx
and eax, 0x1fc07f
and esi, 0x7f
shl esi, 7
or esi, eax
mov al, 3
jmp 0x51e86e
lea edx, [esp + 0x50]
call fcn.0043ff30
mov esi, dword [esp + 0x50]
xor ecx, ecx
cmp ecx, dword [esp + 0x54]
je 0x51e86e
or esi, 0xffffffff
mov edx, dword [esp + 0x18]
movzx eax, al
add edi, eax
cmp byte [esp + 0x13], 0xd
jne 0x51e88f
lea ecx, [edi + edx]
lea edx, [esp + 0x48]
call fcn.0043ff30
movzx eax, al
add edi, eax
mov eax, dword [esp + 0x14]
cmp esi, dword [eax + 0x24]
jbe 0x51e89b
mov dword [eax + 0x24], esi
mov ecx, dword [esp + 0x1c]
mov eax, 0x80808081
lea ecx, [ecx - 0xc]
shl ecx, 5
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, 0xffffffe9
add ecx, edx
cmp byte [esp + 0x13], 0xd
mov dword [esp + 0x30], ecx
jne 0x51e8cf
mov eax, dword [esp + 0x1c]
add eax, 0xffffffdd
jmp 0x51e8f3
mov ecx, dword [esp + 0x1c]
mov eax, 0x80808081
lea ecx, [ecx - 0xc]
shl ecx, 6
imul ecx
add edx, ecx
mov ecx, dword [esp + 0x30]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, 0xffffffe9
add eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffffc
mov dword [esp + 0x2c], eax
mov eax, esi
sub eax, ecx
cdq
idiv dword [esp + 0x2c]
lea eax, [edx + ecx]
cmp eax, dword [esp + 0x38]
cmovle ecx, eax
mov dword [esp + 0x30], ecx
test ecx, ecx
js 0x51ea58
mov dword [ebx], ecx
cmp esi, ecx
jbe 0x51ea13
mov edx, dword [esp + 0x1c]
mov eax, esi
sub eax, ecx
add edx, 0xfffffffb
add eax, edx
xor edx, edx
div dword [esp + 0x2c]
mov dword [esp + 0x38], eax
lea eax, [ecx + edi]
lea ecx, [eax + 4]
mov dword [esp + 0x48], eax
cmp ecx, dword [esp + 0x1c]
jg 0x51ea58
cmp esi, 0x7fffffff
ja 0x51ea58
mov edi, dword [esp + 0x38]
mov dword [ebx + 8], edi
lea eax, [edi - 1]
imul eax, dword [esp + 0x2c]
sub esi, eax
sub esi, dword [esp + 0x30]
mov dword [ebx + 0x10], esi
call fcn.004e4f50
test eax, eax
jne 0x51ea45
lea eax, [edi*4]
push 0
push eax
call fcn.0043b050
add esp, 8
mov dword [ebx + 0xc], eax
test eax, eax
je 0x51e772
mov ecx, dword [esp + 0x48]
mov esi, 1
mov edx, dword [esp + 0x18]
mov ecx, dword [ecx + edx]
bswap ecx
mov dword [eax], ecx
cmp edi, esi
jle 0x51ea17
nop dword [eax]
mov eax, dword [ebx + 0xc]
lea edx, [esp + 0x34]
push 0
push edx
mov ecx, dword [eax + esi*4 - 4]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x3c], 0
push ecx
mov eax, dword [eax + 4]
mov eax, dword [eax]
push eax
mov eax, dword [eax + 0xdc]
call eax
add esp, 0x10
test eax, eax
jne 0x51ea3e
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
mov eax, dword [ebx + 0xc]
bswap ecx
mov dword [eax + esi*4], ecx
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x51ea0e
call fcn.0044c510
inc esi
cmp esi, edi
jl 0x51e9c0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x14]
inc eax
mov edi, dword [esp + 0x44]
add edi, 0x18
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edi
cmp eax, dword [ebx + 0x14]
jl 0x51e7c5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0xc], 0
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x14]
mov ecx, ebx
mov byte [ebx + 0x10], 0
call fcn.0051e280
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret