Function at 0x66b148
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push esi
xor ecx, ecx
push edi
mov edi, dword [ebx + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edi
cmp eax, ecx
je 0x66b179
mov dword [esp + 0x10], eax
mov eax, dword [eax + 0x44]
inc word [eax + 0x16]
jmp 0x66b185
mov esi, dword [ebp + 0xc]
call fcn.006673f8
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x44]
push eax
call fcn.006650c8
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
test edi, edi
jne 0x66b455
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x40]
movzx esi, byte [eax + 0x24]
movzx edx, byte [eax + 0x25]
movzx ecx, byte [eax + 0x26]
shl esi, 8
or esi, edx
movzx edx, byte [eax + 0x27]
shl esi, 8
or esi, ecx
shl esi, 8
or esi, edx
lea ecx, [esi + 1]
mov edx, ecx
shr edx, 0x18
mov byte [eax + 0x24], dl
mov edx, ecx
shr edx, 0x10
mov byte [eax + 0x25], dl
mov edx, ecx
shr edx, 8
mov edi, ebx
mov ebx, dword [ebp + 0xc]
mov byte [eax + 0x26], dl
mov byte [eax + 0x27], cl
cmp byte [edi + 0x12], 0
mov dword [esp + 0x24], esi
je 0x66b252
cmp dword [esp + 0x10], 0
jne 0x66b218
lea eax, [esp + 0x10]
push eax
xor eax, eax
mov esi, ebx
call fcn.006673a8
mov edi, eax
add esp, 4
test edi, edi
jne 0x66b455
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x44]
push edx
call fcn.006650c8
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
test edi, edi
jne 0x66b455
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x3c]
movzx edx, word [ecx + 0x16]
mov eax, dword [eax + 0x40]
push edx
push edi
push eax
call fcn.006d1728
mov edi, dword [ebp + 8]
add esp, 0xc
cmp byte [edi + 0x13], 0
je 0x66b27c
lea ecx, [esp + 0x18]
push ecx
push 0
push 2
mov eax, ebx
mov ecx, edi
call fcn.00666578
mov edi, dword [esp + 0x24]
add esp, 0xc
test edi, edi
jne 0x66b455
mov edi, dword [ebp + 8]
test esi, esi
je 0x66b3c3
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x40]
movzx ecx, byte [eax + 0x20]
movzx esi, byte [eax + 0x21]
movzx edx, byte [eax + 0x22]
add eax, 0x20
movzx eax, byte [eax + 3]
shl ecx, 8
or esi, ecx
shl esi, 8
or esi, edx
shl esi, 8
or esi, eax
lea ecx, [esp + 0x14]
push ecx
xor eax, eax
mov dword [esp + 0x24], esi
call fcn.006673a8
mov edi, eax
add esp, 4
test edi, edi
jne 0x66b455
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x40]
movzx esi, byte [eax + 4]
movzx ecx, byte [eax + 5]
movzx edx, byte [eax + 6]
add eax, 4
movzx eax, byte [eax + 3]
shl esi, 8
or esi, ecx
mov ecx, dword [ebp + 8]
shl esi, 8
or esi, edx
shl esi, 8
or esi, eax
movzx eax, word [ecx + 0x18]
shr eax, 2
lea edx, [eax - 2]
cmp esi, edx
jbe 0x66b315
mov eax, 0xaa00
call fcn.006b4838
mov edi, eax
jmp 0x66b455
add eax, 0xfffffff8
cmp esi, eax
jae 0x66b3c1
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x44]
push ecx
call fcn.006650c8
mov edi, eax
add esp, 4
test edi, edi
jne 0x66b455
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0x40]
lea ecx, [esi + 1]
add eax, 4
mov edx, ecx
shr edx, 0x18
mov byte [eax], dl
mov edx, ecx
shr edx, 0x10
mov byte [eax + 1], dl
mov byte [eax + 3], cl
mov edx, ecx
shr edx, 8
mov byte [eax + 2], dl
mov eax, dword [edi + 0x40]
lea esi, [eax + esi*4 + 8]
mov eax, ebx
shr eax, 8
mov ecx, ebx
mov edx, ebx
mov byte [esi + 2], al
mov eax, dword [esp + 0x10]
shr ecx, 0x18
shr edx, 0x10
mov byte [esi], cl
mov byte [esi + 1], dl
mov byte [esi + 3], bl
test eax, eax
je 0x66b3ae
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x12], 0
jne 0x66b3ae
mov ecx, dword [eax + 0x44]
movzx eax, word [ecx + 0x14]
test al, 2
je 0x66b3ae
mov edx, dword [ecx + 0x10]
cmp dword [edx + 0x5c], 0
jne 0x66b3ae
or eax, 0x20
mov word [ecx + 0x14], ax
mov eax, dword [ebp + 8]
push ebx
call fcn.006661d8
add esp, 4
mov edi, eax
jmp 0x66b455
mov edi, ecx
cmp dword [esp + 0x10], 0
jne 0x66b3e1
lea eax, [esp + 0x10]
push eax
xor eax, eax
mov esi, ebx
call fcn.006673a8
mov edi, eax
add esp, 4
test edi, edi
jne 0x66b455
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x44]
push edx
call fcn.006650c8
mov edi, eax
add esp, 4
test edi, edi
jne 0x66b455
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0x40]
mov edx, ecx
shr edx, 0x18
mov byte [eax], dl
mov byte [eax + 3], cl
mov edx, ecx
shr edx, 0x10
mov byte [eax + 1], dl
mov edx, ecx
shr edx, 8
mov byte [eax + 2], dl
mov eax, dword [esi + 0x40]
add eax, 4
mov byte [eax], 0
mov byte [eax + 1], 0
mov byte [eax + 2], 0
mov byte [eax + 3], 0
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x40]
add eax, 0x20
mov ecx, ebx
shr ecx, 0x18
mov byte [eax], cl
mov edx, ebx
shr edx, 0x10
mov ecx, ebx
shr ecx, 8
mov byte [eax + 1], dl
mov byte [eax + 2], cl
mov byte [eax + 3], bl
mov eax, dword [esp + 0x10]
test eax, eax
je 0x66b474
mov byte [eax], 0
mov eax, dword [eax + 0x44]
test eax, eax
je 0x66b474
mov esi, dword [eax + 0x10]
call fcn.00660898
call fcn.00664a58
mov eax, dword [esp + 0x14]
test eax, eax
je 0x66b490
mov eax, dword [eax + 0x44]
test eax, eax
je 0x66b490
mov esi, dword [eax + 0x10]
call fcn.00660898
call fcn.00664a58
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret