Function at 0x52f3c0
Capabilities:
Enumerate pe sections

Disassembly:
mov edx, dword [esp + 0x10]
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push edi
cmp edx, 1
jae 0x52efc1
pop edi
mov edx, 0xffffffb8
pop ebp
mov eax, edx
pop ebx
add esp, 0x18
ret
cmp edx, 4
jb 0x52effc
mov al, byte [ebx + edx - 1]
lea edi, [edx - 4]
add edi, ebx
mov ebp, dword [edi]
test al, al
je 0x52eff0
movzx eax, al
bsr ecx, eax
mov eax, 8
sub eax, ecx
cmp edx, 0xffffff88
jbe 0x52f066
pop edi
pop ebp
mov eax, edx
pop ebx
add esp, 0x18
ret
pop edi
or edx, 0xffffffff
pop ebp
mov eax, edx
pop ebx
add esp, 0x18
ret
movzx ebp, byte [ebx]
lea eax, [edx - 2]
mov edi, ebx
cmp eax, 5
ja case.default.0x52f009
jmp dword [eax*4 + 0x52f3a0]
movzx eax, byte [ebx + 6]
shl eax, 0x10
add ebp, eax
movzx eax, byte [ebx + 5]
shl eax, 8
add ebp, eax
movzx eax, byte [ebx + 4]
add ebp, eax
movzx eax, byte [ebx + 3]
shl eax, 0x18
add ebp, eax
movzx eax, byte [ebx + 2]
shl eax, 0x10
add ebp, eax
movzx eax, byte [ebx + 1]
shl eax, 8
add ebp, eax
mov al, byte [ebx + edx - 1]
test al, al
je 0x52f392
movzx eax, al
mov ecx, 8
bsr eax, eax
sub ecx, eax
mov eax, 4
sub eax, edx
lea eax, [ecx + eax*8]
mov edx, dword [esp + 0x2c]
test edx, edx
push esi
mov esi, dword [esp + 0x2c]
lea ecx, [esi + edx]
cmovle ecx, esi
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x3c]
lea edx, [ecx + 4]
movzx ecx, byte [ecx + 2]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov ecx, edx
sub ecx, esi
cmp ecx, 4
jb 0x52f185
add edx, 0xfffffffd
mov dword [esp + 0x20], edx
cmp eax, 0x20
jbe 0x52f0b7
mov edi, 0x5a1370
mov esi, 3
jmp 0x52f0fe
lea ecx, [ebx + 4]
cmp edi, ecx
jb 0x52f0cc
mov ecx, eax
and eax, 7
shr ecx, 3
sub edi, ecx
xor esi, esi
jmp 0x52f0fc
cmp edi, ebx
jne 0x52f0da
cmp eax, 0x20
sbb esi, esi
add esi, 2
jmp 0x52f0fe
mov ecx, eax
mov edx, edi
shr ecx, 3
sub edx, ecx
cmp edx, ebx
jae 0x52f0eb
mov ecx, edi
sub ecx, ebx
sub edi, ecx
imul ecx, ecx, 0xfffffff8
add eax, ecx
cmp edx, ebx
mov edx, dword [esp + 0x20]
sbb esi, esi
neg esi
mov ebp, dword [edi]
cmp dword [esp + 0x2c], edx
sbb edx, edx
xor ecx, ecx
neg edx
test esi, esi
sete cl
test ecx, edx
je 0x52f1c6
mov esi, dword [esp + 0x1c]
mov ecx, eax
mov ebx, dword [esp + 0x2c]
and ecx, 0x1f
neg esi
mov edx, ebp
shl edx, cl
and esi, 0x1f
mov ecx, esi
shr edx, cl
mov ecx, dword [esp + 0x10]
movzx ecx, word [ecx + edx*4]
mov word [ebx], cx
mov ebx, dword [esp + 0x10]
movzx ecx, byte [ebx + edx*4 + 2]
add eax, ecx
movzx ecx, byte [ebx + edx*4 + 3]
add dword [esp + 0x2c], ecx
mov edx, ebp
mov ecx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, esi
mov esi, dword [esp + 0x2c]
shr edx, cl
movzx ecx, word [ebx + edx*4]
mov word [esi], cx
movzx ecx, byte [ebx + edx*4 + 2]
add eax, ecx
movzx ecx, byte [ebx + edx*4 + 3]
mov ebx, dword [esp + 0x34]
add esi, ecx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x2c], esi
jmp 0x52f0a6
cmp eax, 0x20
jbe 0x52f191
mov edi, 0x5a1370
jmp 0x52f1ce
lea ecx, [ebx + 4]
cmp edi, ecx
jb 0x52f1a6
mov ecx, eax
shr ecx, 3
sub edi, ecx
and eax, 7
mov ebp, dword [edi]
jmp 0x52f1ce
cmp edi, ebx
je 0x52f1ce
mov edx, eax
mov ecx, edi
shr edx, 3
sub ecx, edx
cmp ecx, ebx
jae 0x52f1bb
mov edx, edi
sub edx, ebx
sub edi, edx
imul ecx, edx, 0xfffffff8
mov ebp, dword [edi]
add eax, ecx
jmp 0x52f1ca
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov ecx, edx
sub ecx, esi
cmp ecx, 2
jb 0x52f32a
add edx, 0xfffffffe
mov dword [esp + 0x20], edx
mov edx, 0x1f
sub edx, dword [esp + 0x1c]
mov dword [esp + 0x24], edx
mov dword [esp + 0x14], edx
cmp eax, 0x20
jbe 0x52f207
mov edi, 0x5a1370
mov dword [esp + 0x38], 3
jmp 0x52f273
lea ecx, [ebx + 4]
cmp edi, ecx
jb 0x52f226
mov ecx, eax
mov dword [esp + 0x38], 0
shr ecx, 3
sub edi, ecx
mov dword [esp + 0x14], edx
and eax, 7
jmp 0x52f271
cmp edi, ebx
jne 0x52f247
mov dword [esp + 0x14], edx
cmp eax, 0x20
jae 0x52f23d
mov dword [esp + 0x38], 1
jmp 0x52f273
mov dword [esp + 0x38], 2
jmp 0x52f273
mov ecx, eax
mov edx, edi
shr ecx, 3
sub edx, ecx
cmp edx, ebx
jae 0x52f258
mov ecx, edi
sub ecx, ebx
sub edi, ecx
imul ecx, ecx, 0xfffffff8
add eax, ecx
cmp edx, ebx
sbb ecx, ecx
neg ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x14], ecx
mov ebp, dword [edi]
cmp dword [esp + 0x20], esi
sbb edx, edx
xor ecx, ecx
inc edx
cmp dword [esp + 0x38], ecx
sete cl
test ecx, edx
je 0x52f2d1
mov ecx, 0x1f
mov edx, ebp
sub ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
mov ecx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
inc ecx
and ecx, 0x1f
shr edx, cl
mov ecx, dword [esp + 0x10]
mov cx, word [ecx + edx*4]
mov word [esi], cx
mov ecx, dword [esp + 0x10]
movzx ecx, byte [ecx + edx*4 + 2]
add eax, ecx
mov ecx, dword [esp + 0x10]
movzx ecx, byte [ecx + edx*4 + 3]
mov edx, dword [esp + 0x24]
add esi, ecx
jmp 0x52f1f3
mov dword [esp + 0x38], edi
cmp esi, dword [esp + 0x20]
ja 0x52f32a
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
inc ecx
and ecx, 0x1f
mov dword [esp + 0x24], ecx
mov ebx, ecx
nop dword [eax]
mov ecx, eax
mov edx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x10]
mov cx, word [ecx + edx*4]
mov word [esi], cx
mov ecx, dword [esp + 0x10]
movzx ecx, byte [ecx + edx*4 + 2]
add eax, ecx
mov ecx, dword [esp + 0x10]
movzx ecx, byte [ecx + edx*4 + 3]
add esi, ecx
cmp esi, edi
jbe 0x52f2f0
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
cmp esi, dword [esp + 0x18]
jae 0x52f371
mov edx, dword [esp + 0x10]
mov ecx, eax
and ecx, 0x1f
shl ebp, cl
mov ecx, dword [esp + 0x1c]
neg ecx
and ecx, 0x1f
shr ebp, cl
mov cl, byte [edx + ebp*4]
mov byte [esi], cl
cmp byte [edx + ebp*4 + 3], 1
jne 0x52f35b
movzx ecx, byte [edx + ebp*4 + 2]
add eax, ecx
jmp 0x52f371
cmp eax, 0x20
jae 0x52f371
movzx ecx, byte [edx + ebp*4 + 2]
add eax, ecx
mov ecx, 0x20
cmp eax, ecx
cmova eax, ecx
pop esi
cmp edi, ebx
jne 0x52f386
cmp eax, 0x20
jne 0x52f386
mov eax, dword [esp + 0x2c]
pop edi
pop ebp
pop ebx
add esp, 0x18
ret
pop edi
pop ebp
mov eax, 0xffffffec
pop ebx
add esp, 0x18
ret
pop edi
mov edx, 0xffffffec
pop ebp
mov eax, edx
pop ebx
add esp, 0x18
ret
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
shr eax, 8
test al, al
je 0x52f3d6
mov dword [esp + 0x14], ecx
jmp 0x52efa0
mov dword [esp + 0x14], ecx
jmp fcn.0052ebf0