Function at 0x515370
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1014
call fcn.005965e0
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x240]
mov edx, dword [eax + 0x18]
lea ecx, [ebx + 0x240]
push esi
push edi
mov dword [esp + 0x10], ebx
call edx
test al, al
je case.0x5157bd.1
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
cmp eax, 0xffffffff
jne 0x5153bb
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5153b2
sub eax, edx
push ebx
call fcn.00514fd0
mov eax, 1
mov dword [ebx + 0x38], eax
cmp dword [ebx + 0x14], eax
jge 0x5153d1
mov dword [ebx + 0x14], eax
mov eax, dword [ebx + 0x25c]
mov ecx, dword [ebx + 0x258]
mov edx, dword [ebx + 8]
push eax
push ecx
lea esi, [ebx + 0x40]
push edx
mov edi, esi
mov ecx, ebx
call fcn.0051d000
mov dword [esp + 0x14], 0
mov ecx, dword [esi + 0x18]
sub ecx, 0
mov eax, dword [esi + 4]
mov dword [esi + 0xc], eax
je 0x515702
dec ecx
jne 0x5156cb
mov edx, dword [esi + 8]
cmp eax, edx
jae 0x5154b0
jmp 0x515420
mov dword [esp + ecx*4 + 0x20], eax
inc ecx
cmp eax, dword [esi + 4]
jb 0x515446
cmp eax, edx
jae 0x515446
movzx edi, byte [eax + 1]
movzx ebx, byte [eax]
shl di, 8
movsx edi, di
or edi, ebx
lea eax, [edi + eax + 0xa]
cmp eax, edx
jbe 0x51544a
mov eax, edx
cmp eax, edx
jb 0x515420
lea ebx, [ecx - 1]
mov dword [esp + 0xc], 0
cmp ebx, 1
jle 0x515492
lea esp, [esp]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
add eax, ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov edx, dword [esp + edi*4 + 0x20]
call fcn.005150a0
test eax, eax
jne 0x515485
inc edi
mov dword [esp + 0xc], edi
jmp 0x515487
mov ebx, edi
mov ecx, ebx
sub ecx, dword [esp + 0xc]
cmp ecx, 1
jg 0x515460
mov edx, dword [esp + 0xc]
lea eax, [ebx + edx]
cdq
sub eax, edx
sar eax, 1
sub eax, 2
jns 0x5154a5
xor eax, eax
mov eax, dword [esp + eax*4 + 0x20]
mov dword [esi + 0xc], eax
lea esp, [esp]
mov edx, dword [esi + 0xc]
cmp edx, dword [esi + 8]
jae 0x5155ec
mov ebx, dword [esp + 0x10]
mov ecx, ebx
call fcn.005150a0
test eax, eax
jne 0x515515
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x14], ecx
cmp ecx, dword [esi + 4]
jb 0x5154fa
mov eax, dword [esi + 8]
cmp ecx, eax
jae 0x5154fa
movzx edx, byte [ecx + 1]
movzx edi, byte [ecx]
shl dx, 8
movsx edx, dx
or edx, edi
lea ecx, [edx + ecx + 0xa]
cmp ecx, eax
ja 0x5154fd
mov edi, ecx
jmp 0x5154ff
mov eax, dword [esi + 8]
mov edi, eax
cmp edi, eax
je 0x5154a9
mov edx, edi
mov ecx, ebx
call fcn.005150a0
test eax, eax
jne 0x515521
mov dword [esi + 0xc], edi
jmp 0x5154b0
lea ecx, [eax - 1]
cmp ecx, 2
ja 0x5156f7
mov ecx, dword [esi + 0xc]
movzx eax, byte [ecx + 9]
cdq
shld edx, eax, 8
shl eax, 8
mov esi, eax
movzx eax, byte [ecx + 8]
mov edi, edx
cdq
or esi, eax
movzx eax, byte [ecx + 7]
or edi, edx
shld edi, esi, 8
shl esi, 8
cdq
or esi, eax
movzx eax, byte [ecx + 6]
or edi, edx
shld edi, esi, 8
shl esi, 8
cdq
or esi, eax
movzx eax, byte [ecx + 5]
or edi, edx
shld edi, esi, 8
shl esi, 8
cdq
or esi, eax
movzx eax, byte [ecx + 4]
or edi, edx
shld edi, esi, 8
shl esi, 8
cdq
or esi, eax
movzx eax, byte [ecx + 3]
or edi, edx
shld edi, esi, 8
cdq
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 2]
or edi, edx
mov edx, esi
mov esi, edi
shld esi, edx, 8
shl edx, 8
mov edi, edx
cdq
or edi, eax
mov eax, dword [ebx + 0x38]
or esi, edx
mov dword [esp + 0x1c], esi
cmp eax, 0x10
jge 0x5155bb
inc eax
mov dword [ebx + 0x38], eax
cmp eax, dword [ebx + 0x14]
jle 0x5155bb
mov dword [ebx + 0x14], eax
mov eax, dword [ebx + 0x38]
cmp eax, 1
jl 0x5155d2
cmp eax, 0x10
jg 0x5155d2
lea esi, [eax + 1]
shl esi, 5
add esi, ebx
jmp 0x5155d4
xor esi, esi
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebx + 8]
push eax
push edi
push ecx
mov edi, esi
mov ecx, ebx
call fcn.0051d000
jmp 0x5153f7
jne 0x5153f7
mov ecx, dword [esp + 0x14]
mov dword [esi + 0xc], ecx
movzx eax, byte [ecx + 9]
cdq
shld edx, eax, 8
shl eax, 8
mov esi, eax
movzx eax, byte [ecx + 8]
mov ebx, edx
cdq
or esi, eax
movzx eax, byte [ecx + 7]
or ebx, edx
shld ebx, esi, 8
cdq
or ebx, edx
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 6]
shld ebx, esi, 8
cdq
or ebx, edx
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 5]
shld ebx, esi, 8
cdq
or ebx, edx
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 4]
shld ebx, esi, 8
cdq
or ebx, edx
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 3]
shld ebx, esi, 8
cdq
shl esi, 8
or eax, esi
or ebx, edx
shld ebx, eax, 8
shl eax, 8
mov edi, eax
movzx eax, byte [ecx + 2]
cdq
or edi, eax
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x38]
or ebx, edx
cmp ecx, 0x10
jge 0x51568c
inc ecx
mov dword [eax + 0x38], ecx
cmp ecx, dword [eax + 0x14]
jle 0x51568c
mov dword [eax + 0x14], ecx
mov ecx, dword [eax + 0x38]
cmp ecx, 1
jl 0x5156b5
cmp ecx, 0x10
jg 0x5156b5
lea esi, [ecx + 1]
push ebx
shl esi, 5
mov ecx, eax
mov edx, dword [ecx + 8]
push edi
add esi, eax
push edx
mov edi, esi
call fcn.0051d000
jmp 0x5153f7
push ebx
mov ecx, eax
mov edx, dword [ecx + 8]
push edi
xor esi, esi
push edx
mov edi, esi
call fcn.0051d000
jmp 0x5153f7
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x18]
push eax
push ecx
push edx
push str.ERROR_17834:_invalid_record_type___d__detected_in_index_record_at_offset__0x_016I64X_
mov ecx, 0x610240
call fcn.00504670
add esp, 0x10
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push eax
push str.ERROR_17833:_compare_returned_an_invalid_result___d_
jmp 0x515830
mov ecx, dword [esi + 8]
cmp eax, ecx
jae 0x5157a2
xor ebx, ebx
cmp eax, ecx
jae 0x51573f
mov dword [esp + ebx*4 + 0x20], eax
inc ebx
cmp eax, dword [esi + 4]
jb 0x515739
cmp eax, ecx
jae 0x515739
movzx edx, byte [eax + 1]
movzx edi, byte [eax]
shl dx, 8
movsx edx, dx
or edx, edi
lea eax, [edx + eax + 0xa]
cmp eax, ecx
jbe 0x51573d
mov eax, ecx
cmp eax, ecx
jb 0x515713
dec ebx
mov dword [esp + 0xc], 0
cmp ebx, 1
jle 0x515782
lea ecx, [ecx]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
add eax, ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov edx, dword [esp + edi*4 + 0x20]
call fcn.005150a0
test eax, eax
jne 0x515775
inc edi
mov dword [esp + 0xc], edi
jmp 0x515777
mov ebx, edi
mov ecx, ebx
sub ecx, dword [esp + 0xc]
cmp ecx, 1
jg 0x515750
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
lea eax, [ebx + edx]
cdq
sub eax, edx
sar eax, 1
sub eax, 2
jns 0x515799
xor eax, eax
mov eax, dword [esp + eax*4 + 0x20]
mov dword [esi + 0xc], eax
jmp 0x5157a6
mov edi, dword [esp + 0x10]
mov ecx, dword [esi + 0xc]
cmp ecx, dword [esi + 8]
jae 0x5157fa
mov edx, dword [esi + 0xc]
mov ecx, edi
call fcn.005150a0
cmp eax, 3
ja case.default.0x5157bd
jmp dword [eax*4 + 0x515860]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 4]
jb 0x5157ef
mov ecx, dword [esi + 8]
cmp eax, ecx
jae 0x5157ef
movzx edx, byte [eax + 1]
movzx ebx, byte [eax]
shl dx, 8
movsx edx, dx
or edx, ebx
lea eax, [edx + eax + 0xa]
cmp eax, ecx
ja 0x5157f2
mov ecx, eax
jmp 0x5157f2
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], ecx
cmp ecx, dword [esi + 8]
jb 0x5157ae
cmp dword [ebp + 0x10], 1
jne 0x51584b
mov eax, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push eax
push str.ERROR_17832:_compare_returned_an_invalid_result___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 8
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
push 0
mov ecx, edi
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc