Function at 0x409ff0
Capabilities:
Enumerate pe sections

Disassembly:
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
sub esp, 0x18
cmp edx, eax
push ebx
push esi
push edi
push ebp
jg 0x40a20d
cmp edx, 3
jne 0x40a0c2
xor ecx, ecx
mov esi, dword [esp + 0x2c]
mov cx, word [esi]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov cx, word [esi + 2]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x10], ecx
mov edx, dword [edi + ecx*4]
xor ecx, ecx
mov cx, word [esi + 4]
mov dword [esp + 0x14], ecx
mov ebp, dword [edi + ecx*4]
mov ecx, dword [esp + 0x18]
sub eax, 3
test eax, eax
mov ecx, dword [edi + ecx*4]
mov dword [ebx], ecx
mov dword [ebx + 4], edx
mov dword [ebx + 8], ebp
jle 0x40a20d
add eax, 2
mov ecx, 3
sub edx, edx
div ecx
add esi, 6
add ebx, 0xc
xor ecx, ecx
mov cx, word [esi]
add dword [esp + 0x18], ecx
xor ecx, ecx
mov cx, word [esi + 2]
mov ebp, dword [esp + 0x18]
and ebp, 0x7ff
add dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x10]
mov ebp, dword [edi + ebp*4]
and ecx, 0x7ff
mov edx, dword [edi + ecx*4]
xor ecx, ecx
mov cx, word [esi + 4]
add dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x14]
and ecx, 0x7ff
dec eax
mov ecx, dword [edi + ecx*4]
mov dword [ebx], ebp
mov dword [ebx + 4], edx
mov dword [ebx + 8], ecx
jne 0x40a065
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
cmp edx, 4
jne 0x40a1b1
xor ecx, ecx
mov esi, dword [esp + 0x2c]
mov cx, word [esi]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov cx, word [esi + 2]
mov dword [esp + 0x10], ecx
mov edx, dword [edi + ecx*4]
xor ecx, ecx
mov dword [esp + 0x24], edx
mov cx, word [esi + 4]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x14], ecx
mov edx, dword [edi + ecx*4]
xor ecx, ecx
mov cx, word [esi + 6]
mov dword [esp + 0x20], ecx
mov ebp, dword [edi + ecx*4]
mov ecx, dword [esp + 0x18]
sub eax, 4
test eax, eax
mov ecx, dword [edi + ecx*4]
mov dword [ebx], ecx
mov ecx, dword [esp + 0x24]
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], ebp
jle 0x40a20d
add eax, 3
shr eax, 2
add esi, 8
add ebx, 0x10
xor ecx, ecx
mov cx, word [esi]
add dword [esp + 0x18], ecx
xor ecx, ecx
mov cx, word [esi + 2]
add dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x10]
and ecx, 0x7ff
mov edx, dword [edi + ecx*4]
xor ecx, ecx
mov cx, word [esi + 4]
mov dword [esp + 0x1c], edx
add dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x14]
and ecx, 0x7ff
mov edx, dword [edi + ecx*4]
xor ecx, ecx
mov cx, word [esi + 6]
add dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x20]
and ecx, 0x7ff
mov ebp, dword [edi + ecx*4]
mov ecx, dword [esp + 0x18]
and ecx, 0x7ff
dec eax
mov ecx, dword [edi + ecx*4]
mov dword [ebx], ecx
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], ebp
jne 0x40a132
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
mov ecx, edx
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x2c]
dec ecx
xor ebp, ebp
mov bp, word [esi]
add esi, 2
and ebp, 0x7ff
add ebx, 4
test ecx, ecx
mov ebp, dword [edi + ebp*4]
mov dword [ebx - 4], ebp
jg 0x40a1bf
sub eax, edx
test eax, eax
jle 0x40a20d
mov ecx, edx
mov bp, word [esi]
dec ecx
add word [esi + edx*2], bp
add esi, 2
xor ebp, ebp
add ebx, 4
mov bp, word [esi - 2]
and ebp, 0x7ff
test ecx, ecx
mov ebp, dword [edi + ebp*4]
mov dword [ebx - 4], ebp
jg 0x40a1e3
sub eax, edx
test eax, eax
jg 0x40a1e1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret