Function at 0x5f02a0
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, ecx
push edi
mov dword [ebx + 0x30], 0
movzx eax, byte [ebp + 9]
mov dword [ebx + 0x2c], eax
movzx edi, byte [ebp + 0xa]
sub edi, dword [esp + 0x30]
cmp byte [ebp + 0x10], 0
mov dword [esp + 0x14], edi
je 0x5f05be
test edi, edi
jle 0x5f05be
mov ecx, dword [ebx + 0x44]
push esi
movzx esi, word [ebp + 0xe]
lea eax, [esi + 2]
cmp eax, ecx
jle 0x5f031c
add esi, 0x1000
cmp ecx, esi
jge 0x5f031c
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x5f0309
dec eax
push eax
call fcn.004b28c1
add esp, 4
mov dword [ebx + 0x3c], 0
lea eax, [esi + 1]
push eax
call fcn.004b28b8
add esp, 4
inc eax
mov dword [ebx + 0x3c], eax
mov dword [ebx + 0x44], esi
mov eax, dword [ebx + 0x40]
cmp edi, eax
jle 0x5f0394
lea esi, [edi + 0x20]
cmp eax, esi
jge 0x5f0394
mov eax, dword [ebx + 0x34]
test eax, eax
je 0x5f0341
push eax
call fcn.004b28c1
add esp, 4
mov dword [ebx + 0x34], 0
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x5f0358
push eax
call fcn.004b28c1
add esp, 4
mov dword [ebx + 0x38], 0
xor ecx, ecx
mov eax, esi
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b28b8
mov dword [ebx + 0x34], eax
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b28b8
mov dword [ebx + 0x38], eax
add esp, 8
mov dword [ebx + 0x40], esi
movzx eax, word [ebp + 0xe]
xor edx, edx
mov esi, dword [ebx + 0x3c]
xor edi, edi
mov ebp, dword [ebp]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edx
cmp dword [esp + 0x18], edx
jle 0x5f05bd
test eax, eax
js 0x5f05bd
mov eax, edi
add edi, 2
and eax, 1
add edi, eax
mov dword [esp + 0x34], edi
cmp edi, 0x3a
jle 0x5f03df
mov ebp, dword [ebp]
mov edi, 2
mov dword [esp + 0x34], edi
movzx eax, word [edi + ebp + 4]
mov ecx, eax
mov dword [esp + 0x24], ecx
cmp eax, dword [esp + 0x30]
jge 0x5f05bd
mov esi, dword [esp + 0x34]
mov eax, esi
and eax, 1
add eax, 2
add eax, esi
cmp eax, 0x3a
jle 0x5f040f
mov ebp, dword [ebp]
mov eax, 2
movzx edi, word [eax + ebp + 4]
cmp eax, 0x3a
jne 0x5f041c
mov ebp, dword [ebp]
lea ecx, [eax - 0x3a]
neg ecx
sbb ecx, ecx
and ecx, eax
mov eax, edi
and eax, 0x8000
mov dword [esp + 0x20], eax
lea esi, [ecx + 1]
movzx ecx, byte [ecx + ebp + 6]
mov dword [esp + 0x34], esi
je 0x5f0444
and edi, 0xffff7fff
test ecx, ecx
je 0x5f0471
mov esi, dword [esp + 0x18]
lea esp, [esp]
cmp edx, esi
jge 0x5f0469
mov eax, dword [ebx + 0x34]
dec ecx
mov dword [eax + edx*4], edi
xor edi, edi
mov eax, dword [ebx + 0x38]
mov word [eax + edx*2], di
inc edx
test ecx, ecx
jg 0x5f0450
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x5f03f8
mov eax, dword [ebx + 0x38]
xor ebx, ebx
mov ecx, dword [esp + 0x24]
not ecx
mov word [eax + edx*2 - 2], cx
cmp dword [esp + 0x14], edx
jge 0x5f05a3
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
mov eax, dword [edi + 0x34]
lea eax, [eax + esi*4]
lea ecx, [ecx]
mov ecx, dword [eax]
sub dword [esp + 0x1c], ecx
js 0x5f04b5
inc esi
add ebx, ecx
add eax, 4
mov dword [edi + 0x30], esi
cmp esi, edx
jl 0x5f04a0
mov edi, dword [esp + 0x34]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x10]
test ebx, ebx
jle 0x5f05a7
mov edx, edi
neg edx
cmp byte [esp + 0x38], 0
je 0x5f0502
and edx, 3
add edi, 4
add edi, edx
cmp edi, 0x3a
jle 0x5f04e9
mov ebp, dword [ebp]
mov edi, 4
push ebx
push dword [edi + ebp + 2]
push esi
call fcn.004b3b20
add esp, 0xc
add esi, ebx
mov dword [esp + 0x10], esi
jmp 0x5f05a7
lea ecx, [edi + 6]
mov dword [esp + 0x10], esi
add edx, 0x3a
add ecx, ebp
cmp ebx, edx
jle 0x5f0588
mov dword [esp + 0x34], 0
mov edi, edi
sub ebx, edx
cmp edx, 4
jle 0x5f055e
lea edi, [edx - 5]
shr edi, 2
inc edi
mov eax, edi
neg eax
lea edx, [edx + eax*4]
movzx eax, byte [ecx]
mov byte [esi], al
movzx eax, byte [ecx + 1]
mov byte [esi + 1], al
movzx eax, byte [ecx + 2]
mov byte [esi + 2], al
movzx eax, byte [ecx + 3]
add ecx, 4
mov byte [esi + 3], al
add esi, 4
sub edi, 1
jne 0x5f0535
mov dword [esp + 0x10], esi
test edx, edx
jle 0x5f0573
sub ecx, esi
mov al, byte [ecx + esi]
dec edx
mov byte [esi], al
inc esi
test edx, edx
jg 0x5f0564
mov dword [esp + 0x10], esi
mov eax, dword [ebp]
mov edx, 0x3a
mov ebp, eax
lea ecx, [eax + 6]
cmp ebx, edx
jg 0x5f0520
mov edi, dword [esp + 0x34]
add edi, ebx
test ebx, ebx
je 0x5f05a7
mov edi, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi], al
inc esi
sub ebx, 1
jne 0x5f0590
mov dword [esp + 0x10], esi
jmp 0x5f05a7
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
cmp edx, dword [esp + 0x18]
jl 0x5f03b8
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x18
ret 0x10