Function at 0x580980
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x34
push ebx
push ebp
mov ebp, dword [ecx + 0xa0]
push esi
test ebp, ebp
push edi
je 0x580bae
xor eax, eax
xor esi, esi
mov ax, word [ecx + 0x14]
mov si, word [ecx + 6]
xor edi, edi
test esi, esi
lea eax, [eax + ecx + 0x18]
jbe 0x580bae
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x5809bd
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
cmp ebp, edx
jb 0x5809ca
add edx, ecx
cmp ebp, edx
jb 0x5809da
inc edi
add eax, 0x28
cmp edi, esi
jb 0x5809b3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
test eax, eax
je 0x580bae
mov ebx, dword [eax + 0x14]
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x48]
sub ebx, edx
add ebx, ebp
add ebx, eax
je 0x580bae
mov eax, dword [ebx + 4]
test eax, eax
je 0x580bae
cmp dword [ebx], 0
je 0x580bae
cmp eax, 8
jb 0x580bae
mov ebp, dword [esp + 0x50]
lea esi, [eax - 8]
mov edx, ebx
lea ecx, [ebx + 8]
mov eax, dword [ebp]
mov dword [esp + 0x48], ecx
sub edx, eax
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x3c]
add ebp, 8
push eax
push ecx
shr esi, 1
mov ecx, ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x54], edx
call fcn.0057fd70
test esi, esi
mov dword [esp + 0x1c], 0
jbe 0x580ba0
mov edx, dword [esp + 0x48]
mov ax, word [edx]
mov cx, ax
shr cx, 0xc
cmp cx, 3
mov dword [esp + 0x20], ecx
jne 0x580b64
mov ecx, dword [ebx]
mov edx, dword [0x5a674c]
and eax, 0xfff
add eax, ecx
mov ecx, dword [ebp + 4]
mov dword [esp + 0x10], eax
mov edi, ecx
mov esi, dword [ecx + 4]
mov cl, 1
cmp esi, edx
je 0x580aae
mov ecx, dword [esi + 0xc]
mov edi, esi
cmp eax, ecx
setb cl
test cl, cl
je 0x580aa7
mov esi, dword [esi]
jmp 0x580aaa
mov esi, dword [esi + 8]
cmp esi, edx
jne 0x580a95
mov dl, byte [ebp + 8]
test dl, dl
je 0x580ad8
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
push edi
push esi
push ecx
mov ecx, ebp
call fcn.005805b0
mov edx, dword [eax]
mov byte [esp + 0x38], 1
mov dword [esp + 0x34], edx
jmp 0x580b64
test cl, cl
mov dword [esp + 0x14], edi
je 0x580b23
lea eax, [esp + 0x28]
mov ecx, ebp
push eax
call fcn.0057fd60
mov ecx, dword [esp + 0x14]
mov edx, dword [eax]
cmp ecx, edx
jne 0x580b16
lea edx, [esp + 0x4c]
lea eax, [esp + 0x10]
push edx
push eax
push edi
lea ecx, [esp + 0x38]
push esi
push ecx
mov ecx, ebp
mov byte [esp + 0x60], 1
call fcn.005805b0
push eax
jmp 0x580b5b
lea ecx, [esp + 0x14]
call fcn.00580920
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
cmp dword [edx + 0xc], eax
jae 0x580b4c
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x10]
push eax
push ecx
push edi
lea edx, [esp + 0x3c]
push esi
push edx
mov ecx, ebp
mov byte [esp + 0x60], 1
call fcn.005805b0
push eax
jmp 0x580b5b
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x14]
push eax
mov byte [esp + 0x50], 0
push ecx
lea ecx, [esp + 0x3c]
call fcn.00580bc0
cmp word [esp + 0x20], 4
jne 0x580b80
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x18]
add ecx, 2
dec eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
add esi, 2
inc eax
mov dword [esp + 0x48], esi
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x580a58
add ebx, dword [ebx + 4]
mov eax, dword [ebx + 4]
test eax, eax
jne 0x580a03
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret