Function at 0x406b40
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov esi, edx
movsx edx, word [esi + 8]
movsx ebp, word [esi + 0xa]
sub eax, edx
sub ecx, ebp
cmp eax, dword [ebx + 0x3f8]
push edi
movzx edi, word [esi + 4]
jl 0x406e4d
movzx edi, di
add edi, eax
cmp edi, dword [ebx + 0x400]
jg 0x406e4d
cmp ecx, dword [ebx + 0x3fc]
jl 0x406e4d
movzx edi, word [esi + 6]
mov dword [esp + 0x18], edi
add edi, ecx
cmp edi, dword [ebx + 0x404]
jg 0x406e4d
mov edx, dword [ebx + 0x3d4]
imul edx, ecx
add edx, eax
mov eax, dword [ebx + 0x3d0]
lea ebp, [eax + edx*2]
mov eax, dword [esp + 0x18]
add eax, eax
add eax, eax
cdq
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2 + 0xc]
mov edi, ebp
mov dword [esp + 0x1c], ebp
movzx eax, word [esi]
movzx edx, ax
mov ecx, edx
and ecx, 0xe000
cmp ecx, 0x8000
jg 0x406d19
je 0x406d07
test ecx, ecx
je 0x406cfc
cmp ecx, 0x2000
je 0x406cc9
cmp ecx, 0x4000
jne 0x406bc7
and eax, 0x1fff
movzx ecx, ax
xor edx, edx
add esi, 2
cmp ecx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
jle 0x406ca7
mov dword [esp + 0x18], edx
movzx eax, word [edi]
movzx ecx, word [esi + 2]
mov edx, eax
shr edx, 6
and edx, 0x1f
mov ebx, ecx
shr ebx, 6
and ebx, 0x1f
shl edx, 5
add edx, ebx
mov dx, word [edx*2 + 0x462718]
mov ebx, eax
shr ebx, 0xb
mov ebp, ecx
and eax, 0x1f
shl ebx, 5
shl eax, 5
shr ebp, 0xb
add ebx, ebp
add dx, word [ebx*2 + 0x461f18]
mov ebx, dword [esp + 0x24]
and ecx, 0x1f
add eax, ecx
add dx, word [eax*2 + 0x462f18]
mov ecx, dword [esp + 0x18]
add dx, word [esi]
mov eax, dword [ebx + 0x3e8]
mov word [eax + ecx*2], dx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x14], eax
cwde
add edi, 2
add esi, 4
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x406c24
mov ebp, dword [esp + 0x1c]
movsx eax, word [esp + 0x28]
mov eax, dword [ebx + eax*4 + 0x324]
push ecx
add ecx, ecx
mov edx, ecx
mov ecx, edi
sub ecx, edx
mov edx, dword [ebx + 0x3e8]
call eax
jmp 0x406bc7
movsx ecx, word [esp + 0x28]
and eax, 0x1fff
movzx eax, ax
mov dword [esp + 0x10], eax
push eax
mov eax, ecx
mov eax, dword [ebx + eax*4 + 0x324]
add esi, 2
mov edx, esi
mov ecx, edi
call eax
mov eax, dword [esp + 0x10]
add eax, eax
add edi, eax
add esi, eax
jmp 0x406bc7
lea edi, [edi + edx*2]
add esi, 2
jmp 0x406bc7
mov ecx, dword [ebx + 0x3d4]
lea ebp, [ebp + ecx*2]
add esi, 2
jmp 0x406bc1
cmp ecx, 0xa000
je 0x406e13
cmp ecx, 0xc000
je 0x406d43
cmp ecx, 0xe000
jne 0x406bc7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
and eax, 0x1fff
movzx ecx, ax
xor edx, edx
add esi, 2
cmp ecx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
jle 0x406de7
mov dword [esp + 0x18], edx
movzx eax, word [edi]
movzx ecx, word [esi + 2]
mov edx, eax
shr edx, 6
and edx, 0x1f
mov ebx, ecx
shr ebx, 6
and ebx, 0x1f
shl edx, 5
add edx, ebx
mov dx, word [edx*2 + 0x462718]
mov ebx, eax
shr ebx, 0xb
mov ebp, ecx
and eax, 0x1f
shl ebx, 5
shl eax, 5
shr ebp, 0xb
add ebx, ebp
add dx, word [ebx*2 + 0x461f18]
mov ebx, dword [esp + 0x24]
and ecx, 0x1f
add eax, ecx
add dx, word [eax*2 + 0x462f18]
mov ecx, dword [esp + 0x18]
add dx, word [esi]
mov eax, dword [ebx + 0x3e8]
mov word [eax + ecx*2], dx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x14], eax
cwde
add edi, 2
add esi, 4
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x406d64
mov ebp, dword [esp + 0x1c]
movsx eax, word [esp + 0x28]
mov eax, dword [ebx + eax*4 + 0x324]
push ecx
add ecx, ecx
mov edx, ecx
mov ecx, edi
sub ecx, edx
mov edx, dword [ebx + 0x3e8]
call eax
mov ecx, dword [ebx + 0x3d4]
lea ebp, [ebp + ecx*2]
jmp 0x406bc1
movsx ecx, word [esp + 0x28]
and eax, 0x1fff
movzx eax, ax
mov dword [esp + 0x10], eax
push eax
mov eax, ecx
mov eax, dword [ebx + eax*4 + 0x324]
add esi, 2
mov edx, esi
mov ecx, edi
call eax
mov ecx, dword [ebx + 0x3d4]
mov edx, dword [esp + 0x10]
lea ebp, [ebp + ecx*2]
lea esi, [esi + edx*2]
jmp 0x406bc1
mov edi, dword [esp + 0x28]
push edi
push esi
add ecx, ebp
add eax, edx
call fcn.00406e70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8