Function at 0x58f870
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x38
mov ebp, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
mov eax, ebp
shr eax, 0x10
mov dword [esp + 0x2c], eax
and ebp, 0xffff
cmp dword [esp + 0x54], 1
je 0x58fa3e
test edi, edi
je 0x58fbc0
cmp dword [esp + 0x54], 0xf
ja 0x58f8f4
mov edx, dword [esp + 0x54]
test edx, edx
je 0x58f8ca
mov edx, dword [esp + 0x54]
add edx, edi
mov eax, dword [esp + 0x2c]
movzx ecx, byte [edi]
add ebp, ecx
inc edi
add eax, ebp
cmp edi, edx
jne 0x58f8ba
mov dword [esp + 0x2c], eax
cmp ebp, 0xfff0
jbe 0x58f8d8
sub ebp, 0xfff1
mov ecx, 0xfff1
mov eax, dword [esp + 0x2c]
xor edx, edx
div ecx
shl edx, 0x10
or edx, ebp
mov eax, edx
add esp, 0x38
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x54], 0x15af
jbe 0x58fa72
sub dword [esp + 0x54], 0x15b0
lea edx, [edi + 0x15b0]
mov dword [esp + 0x30], edx
mov eax, edi
nop
movzx edi, byte [eax]
add ebp, edi
mov dword [esp], ebp
movzx edi, byte [eax + 1]
add edi, ebp
mov dword [esp + 4], edi
movzx edi, byte [eax + 2]
add edi, dword [esp + 4]
mov dword [esp + 8], edi
movzx edi, byte [eax + 3]
add edi, dword [esp + 8]
mov dword [esp + 0xc], edi
movzx edi, byte [eax + 4]
add edi, dword [esp + 0xc]
mov dword [esp + 0x10], edi
movzx edi, byte [eax + 5]
add edi, dword [esp + 0x10]
mov dword [esp + 0x14], edi
movzx edi, byte [eax + 6]
add edi, dword [esp + 0x14]
mov dword [esp + 0x18], edi
movzx edi, byte [eax + 7]
add edi, dword [esp + 0x18]
mov dword [esp + 0x1c], edi
movzx edi, byte [eax + 8]
add edi, dword [esp + 0x1c]
mov dword [esp + 0x20], edi
movzx edi, byte [eax + 9]
add edi, dword [esp + 0x20]
mov dword [esp + 0x24], edi
movzx edi, byte [eax + 0xa]
add edi, dword [esp + 0x24]
mov dword [esp + 0x28], edi
movzx esi, byte [eax + 0xb]
add esi, edi
movzx ebx, byte [eax + 0xc]
add ebx, esi
movzx ecx, byte [eax + 0xd]
add ecx, ebx
movzx edx, byte [eax + 0xe]
add edx, ecx
movzx ebp, byte [eax + 0xf]
add ebp, edx
mov edi, dword [esp + 4]
add edi, dword [esp]
add edi, dword [esp + 8]
add edi, dword [esp + 0xc]
add edi, dword [esp + 0x10]
add edi, dword [esp + 0x14]
add edi, dword [esp + 0x18]
add edi, dword [esp + 0x1c]
add edi, dword [esp + 0x20]
add edi, dword [esp + 0x24]
add edi, dword [esp + 0x28]
add edi, esi
add edi, ebx
add ecx, edi
add edx, ecx
add edx, ebp
add dword [esp + 0x2c], edx
add eax, 0x10
cmp eax, dword [esp + 0x30]
jne 0x58f918
mov edi, eax
mov eax, ebp
mov ecx, 0xfff1
xor edx, edx
div ecx
mov ebp, edx
mov eax, dword [esp + 0x2c]
xor edx, edx
div ecx
mov dword [esp + 0x2c], edx
cmp dword [esp + 0x54], 0x15af
ja 0x58f902
mov eax, dword [esp + 0x54]
test eax, eax
jne 0x58fa67
mov edx, dword [esp + 0x2c]
shl edx, 0x10
or edx, ebp
mov eax, edx
add esp, 0x38
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [edi]
add ebp, eax
cmp ebp, 0xfff0
jbe 0x58fa51
sub ebp, 0xfff1
mov edx, dword [esp + 0x2c]
add edx, ebp
cmp edx, 0xfff0
jbe 0x58fa2f
sub edx, 0xfff1
jmp 0x58fa2f
cmp dword [esp + 0x54], 0xf
jbe 0x58fbca
mov edx, edi
mov ecx, dword [esp + 0x54]
sub ecx, 0x10
shr ecx, 4
mov dword [esp + 0x30], ecx
mov eax, ecx
shl eax, 4
lea eax, [edi + eax + 0x10]
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], edi
movzx esi, byte [edx]
add esi, ebp
movzx edi, byte [edx + 1]
add edi, esi
movzx ebx, byte [edx + 2]
add ebx, edi
movzx ecx, byte [edx + 3]
add ecx, ebx
movzx eax, byte [edx + 4]
add eax, ecx
movzx ebp, byte [edx + 5]
add ebp, eax
mov dword [esp], ebp
movzx ebp, byte [edx + 6]
add ebp, dword [esp]
mov dword [esp + 4], ebp
movzx ebp, byte [edx + 7]
add ebp, dword [esp + 4]
mov dword [esp + 8], ebp
movzx ebp, byte [edx + 8]
add ebp, dword [esp + 8]
mov dword [esp + 0xc], ebp
movzx ebp, byte [edx + 9]
add ebp, dword [esp + 0xc]
mov dword [esp + 0x10], ebp
movzx ebp, byte [edx + 0xa]
add ebp, dword [esp + 0x10]
mov dword [esp + 0x14], ebp
movzx ebp, byte [edx + 0xb]
add ebp, dword [esp + 0x14]
mov dword [esp + 0x18], ebp
movzx ebp, byte [edx + 0xc]
add ebp, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
movzx ebp, byte [edx + 0xd]
add ebp, dword [esp + 0x1c]
mov dword [esp + 0x20], ebp
movzx ebp, byte [edx + 0xe]
add ebp, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
movzx ebp, byte [edx + 0xf]
add ebp, dword [esp + 0x24]
add esi, edi
add ebx, esi
add ecx, ebx
add eax, ecx
add eax, dword [esp]
add eax, dword [esp + 4]
add eax, dword [esp + 8]
add eax, dword [esp + 0xc]
add eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
add eax, dword [esp + 0x18]
add eax, dword [esp + 0x1c]
add eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
add eax, ebp
add dword [esp + 0x2c], eax
add edx, 0x10
cmp edx, dword [esp + 0x28]
jne 0x58fa93
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x54]
and edx, 0xf
mov eax, dword [esp + 0x30]
inc eax
shl eax, 4
add edi, eax
lea eax, [edx - 1]
test edx, edx
je 0x58fba2
lea edx, [edi + eax + 1]
mov eax, dword [esp + 0x2c]
movzx ecx, byte [edi]
add ebp, ecx
inc edi
add eax, ebp
cmp edi, edx
jne 0x58fb92
mov dword [esp + 0x2c], eax
mov ecx, 0xfff1
mov eax, ebp
xor edx, edx
div ecx
mov ebp, edx
mov eax, dword [esp + 0x2c]
xor edx, edx
div ecx
mov dword [esp + 0x2c], edx
jmp 0x58fa2b
mov edx, 1
jmp 0x58f8ea
mov eax, dword [esp + 0x54]
dec eax
jmp 0x58fb8a