Function at 0x401660
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov edi, dword [edx]
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], ecx
test edi, edi
je 0x4018b0
mov esi, eax
mov eax, dword [eax]
lea ecx, [edi - 1]
mov dword [edx], ecx
lea ebx, [eax + 1]
mov dword [esi], ebx
movzx ebx, byte [eax]
mov byte [esp + 0x10], bl
test bl, bl
jns 0x401891
test ecx, ecx
je 0x4018b0
lea ebx, [eax + 2]
lea ecx, [edi - 2]
mov dword [edx], ecx
mov dword [esi], ebx
movzx ebx, byte [eax + 1]
test byte [esp + 0x10], 0x40
je 0x401882
test ecx, ecx
je 0x4018b0
lea ecx, [eax + 3]
lea ebp, [edi - 3]
mov dword [edx], ebp
mov dword [esi], ecx
movzx ecx, byte [eax + 2]
mov esi, dword [esp + 0x14]
shl ecx, 8
or ecx, ebx
xor ebx, ebx
mov dword [esp + 0x18], ecx
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov dword [esi], ecx
mov dword [esi + 4], ebx
test byte [esp + 0x10], 0x20
je 0x4018bd
test ebp, ebp
je 0x4018b0
mov esi, dword [esp + 0xc]
lea ecx, [eax + 4]
lea ebp, [edi - 4]
xor ebx, ebx
mov dword [edx], ebp
mov dword [esi], ecx
movzx ecx, byte [eax + 3]
shld ebx, ecx, 0x10
shl ecx, 0x10
mov dword [esp + 0x20], ecx
mov esi, dword [esp + 0x20]
or esi, dword [esp + 0x18]
mov dword [esp + 0x24], ebx
mov dword [esp], esi
mov esi, dword [esp + 0x14]
mov dword [esp + 4], ebx
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
mov dword [esi], ecx
mov dword [esi + 4], ebx
test byte [esp + 0x10], 0x10
je 0x40190b
test ebp, ebp
je 0x4018b0
mov ebx, dword [esp + 0xc]
lea ecx, [eax + 5]
lea ebp, [edi - 5]
mov dword [edx], ebp
mov dword [ebx], ecx
movzx ecx, byte [eax + 4]
xor ebx, ebx
shld ebx, ecx, 0x18
shl ecx, 0x18
mov dword [esp + 0x18], ecx
or ecx, dword [esp]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x1c]
or ebx, dword [esp + 4]
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
mov dword [esi], ecx
mov dword [esi + 4], ebx
test byte [esp + 0x10], 8
je 0x401917
test ebp, ebp
je 0x4018b0
mov ebx, dword [esp + 0xc]
lea ecx, [eax + 6]
lea ebp, [edi - 6]
mov dword [edx], ebp
mov dword [ebx], ecx
movzx ecx, byte [eax + 5]
or ecx, dword [esp + 4]
mov dword [esp + 4], ecx
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
mov dword [esi], ecx
mov dword [esi + 4], ebx
test byte [esp + 0x10], 4
je 0x401923
test ebp, ebp
je 0x4018b0
mov ebx, dword [esp + 0xc]
lea ecx, [eax + 7]
lea ebp, [edi - 7]
mov dword [edx], ebp
mov dword [ebx], ecx
movzx ecx, byte [eax + 6]
shl ecx, 8
or ecx, dword [esp + 4]
mov dword [esp + 4], ecx
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
mov dword [esi], ecx
mov dword [esi + 4], ebx
test byte [esp + 0x10], 2
je 0x40192f
test ebp, ebp
je 0x4018b0
mov ebx, dword [esp + 0xc]
lea ecx, [eax + 8]
lea ebp, [edi - 8]
mov dword [edx], ebp
mov dword [ebx], ecx
movzx ecx, byte [eax + 7]
shl ecx, 0x10
or ecx, dword [esp + 4]
mov dword [esp + 4], ecx
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
mov dword [esi], ecx
mov dword [esi + 4], ebx
test byte [esp + 0x10], 1
je 0x40193b
test ebp, ebp
je 0x4018b0
sub edi, 9
mov esi, dword [esp]
mov dword [edx], edi
mov edi, dword [esp + 0xc]
lea edx, [eax + 9]
mov dword [edi], edx
movzx eax, byte [eax + 8]
mov edi, dword [esp + 4]
mov edx, dword [esp + 0x14]
shl eax, 0x18
or eax, edi
mov dword [edx], esi
mov dword [edx + 4], eax
add esp, 0x2c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x10]
shl ecx, 8
and ecx, 0x3f00
or ebx, ecx
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
mov dword [eax + 4], 0
xor eax, eax
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 0x2c
mov eax, 0x10
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 2
mov eax, 0x20
mov esi, esi
lea edi, [edi]
lea edx, [eax - 1]
movzx eax, byte [esp + 0x10]
shl ecx, 3
xor ebx, ebx
mov esi, dword [esp]
mov edi, dword [esp + 4]
and eax, edx
xor edx, edx
shld edx, eax, cl
shl eax, cl
test cl, 0x20
cmovne edx, eax
cmovne eax, ebx
mov ebx, edx
mov edx, dword [esp + 0x14]
or eax, esi
mov dword [edx], eax
mov eax, edi
or eax, ebx
mov dword [edx + 4], eax
xor eax, eax
jmp 0x4018a0
mov ecx, 3
mov eax, 0x10
jmp 0x4018d0
mov ecx, 4
mov eax, 8
jmp 0x4018d0
mov ecx, 5
mov eax, 4
jmp 0x4018d0
mov ecx, 6
mov eax, 2
jmp 0x4018d0
mov ecx, 7
mov eax, 1
jmp 0x4018d0