Function at 0x40a140
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x34
mov eax, dword [esp + 0x4c]
push ebx
mov ebx, dword [0xd15acc]
push ebp
lea ecx, [eax + eax*4]
push esi
push edi
lea edx, [eax + ecx*2]
lea eax, [edx*8 + 0xc7f970]
mov edx, dword [esp + 0x58]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x48]
and edx, 0xff
mov cx, word [eax + 4]
mov di, word [eax + 6]
and edx, 0x800000ff
jns 0x40a188
dec edx
or edx, 0xffffff00
inc edx
mov esi, dword [esp + 0x50]
mov byte [esp + 0x58], dl
mov edx, dword [esp + 0x4c]
mov eax, dword [edx]
cmp eax, esi
jle 0x40a1a2
sub eax, esi
mov dword [esp + 0x5c], eax
jmp 0x40a1aa
mov dword [esp + 0x5c], 0
mov eax, dword [edx + 8]
and ecx, 0xffff
mov dword [esp + 0x10], ecx
lea ebp, [ecx + esi]
cmp eax, ebp
jge 0x40a1c2
sub eax, esi
jmp 0x40a1c4
mov eax, ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x50], eax
cmp ecx, eax
jge 0x40a40b
mov ecx, dword [edx + 4]
mov eax, dword [esp + 0x54]
cmp ecx, eax
jle 0x40a1e3
sub ecx, eax
jmp 0x40a1e5
xor ecx, ecx
mov edx, dword [edx + 0xc]
and edi, 0xffff
mov dword [esp + 0x2c], edi
lea ebp, [edi + eax]
cmp edx, ebp
jge 0x40a1fd
sub edx, eax
jmp 0x40a1ff
mov edx, edi
mov ebp, dword [esp + 0x10]
add eax, ecx
imul eax, dword [0x541bec]
shr ebp, 1
mov dword [esp + 0x24], ebp
mov ebp, edi
shr ebp, 1
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x48]
lea edi, [ebp + edi*2 + 8]
mov ebp, dword [esp + 0x5c]
add eax, ebp
mov dword [esp + 0x30], edi
add eax, esi
mov esi, dword [0xb5566c]
lea edi, [esi + eax*2]
mov eax, dword [esp + 0x58]
and eax, 0xff
shl eax, 2
cmp ecx, edx
mov ebp, dword [eax + 0x559428]
mov eax, dword [eax + 0x559828]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x58], eax
jge 0x40a40b
mov esi, eax
mov eax, ebp
imul eax, dword [esp + 0x5c]
imul esi, ecx
add esi, eax
mov eax, ebp
neg eax
mov dword [esp + 0x40], eax
mov eax, ebp
mov ebp, dword [esp + 0x58]
imul eax, ecx
imul ebp, dword [esp + 0x5c]
sub ebp, eax
sub edx, ecx
mov dword [esp + 0x4c], esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x5c]
mov eax, dword [esp + 0x4c]
mov edx, ebp
sub ecx, esi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x54], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x24]
sar edx, 0x10
add edx, ecx
js 0x40a3ac
cmp edx, dword [esp + 0x10]
jge 0x40a3ac
mov ecx, eax
mov eax, dword [esp + 0x28]
sar ecx, 0x10
sub eax, ecx
js 0x40a3ac
cmp eax, dword [esp + 0x2c]
jge 0x40a3ac
mov esi, dword [esp + 0x48]
xor ecx, ecx
mov cx, word [esi + eax*2 + 8]
mov eax, dword [esp + 0x30]
mov si, word [eax + ecx*2]
lea eax, [eax + ecx*2]
mov cx, word [eax + 2]
add eax, 2
add eax, 2
test cx, cx
je 0x40a3ac
and esi, 0xffff
sub edx, esi
js 0x40a3ac
and ecx, 0xffff
cmp edx, ecx
jl 0x40a341
mov si, word [eax + ecx*2]
lea eax, [eax + ecx*2]
add eax, 2
sub edx, ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a310
jmp 0x40a3ac
mov cx, word [eax + edx*2]
mov si, word [edi]
mov edx, dword [esp + 0x34]
mov eax, esi
shr ecx, 5
and ecx, 0x1f
and eax, 0xffff
mov ebp, eax
mov cx, word [edx + ecx*2]
mov edx, eax
and ecx, 0xffff
and ebp, 0x3e0
shr edx, 5
mov esi, ecx
and edx, 0x3e0
shr esi, 0xa
add edx, esi
mov esi, ecx
shr esi, 5
mov dx, word [ebx + edx*2]
and esi, 0x1f
add esi, ebp
and eax, 0x1f
shl dx, 5
or dx, word [ebx + esi*2]
and ecx, 0x1f
shl eax, 5
mov ebp, dword [esp + 0x1c]
add eax, ecx
shl edx, 5
or dx, word [ebx + eax*2]
mov word [edi], dx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
add eax, ecx
mov ecx, dword [esp + 0x18]
add edx, esi
add edi, 2
dec ecx
mov dword [esp + 0x54], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jne 0x40a2b3
mov eax, dword [0x541bec]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
lea edi, [ecx + eax*2]
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x20]
add ebp, edx
mov edx, esi
mov dword [esp + 0x1c], ebp
add ecx, edx
dec eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x20], eax
jne 0x40a293
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret