Function at 0x40c150
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x38
mov eax, dword [esp + 0x54]
push ebx
push ebp
mov ebp, dword [esp + 0x48]
lea ecx, [eax + eax*4]
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [ebp]
lea edx, [eax + ecx*2]
xor ecx, ecx
sub esi, ebx
mov ebx, dword [0xd413b8]
lea eax, [edx*8 + 0xcac170]
mov edx, dword [esp + 0x48]
mov dword [esp + 0x30], eax
xor eax, eax
mov ax, word [edx + 4]
mov cx, word [edx + 6]
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
cdq
sub eax, edx
push edi
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x10], 0
cdq
sub eax, edx
and ecx, 0xff
sar eax, 1
and ecx, 0x800000ff
mov dword [esp + 0x14], esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], eax
jns 0x40c1d4
dec ecx
or ecx, 0xffffff00
inc ecx
mov edi, dword [esp + 0x60]
mov edx, dword [esp + 0x54]
mov byte [esp + 0x5c], cl
mov ecx, dword [edi]
cmp edx, ecx
jge 0x40c1f2
sub ecx, edx
sub esi, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], esi
mov ecx, dword [edi + 8]
add esi, edx
cmp esi, ecx
jle 0x40c201
sub ecx, edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x60]
mov edi, dword [ebp + 4]
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x64], 0
mov esi, dword [ecx + 0xc]
mov ecx, dword [esp + 0x58]
sub edx, edi
mov dword [esp + 0x24], edx
lea ebp, [edx + ecx]
cmp ebp, esi
jle 0x40c22f
sub esi, ecx
mov edx, esi
mov dword [esp + 0x24], edx
mov esi, dword [esp + 0x60]
mov esi, dword [esi + 4]
cmp ecx, esi
jge 0x40c240
sub esi, ecx
mov dword [esp + 0x64], esi
mov esi, dword [esp + 0x64]
mov ebp, dword [esp + 0x10]
add esi, ecx
mov ecx, dword [esp + 0x54]
imul esi, dword [0x557ce4]
add esi, ebp
add esi, ecx
mov ecx, dword [0xc32ffc]
lea esi, [ecx + esi*2]
mov ecx, dword [esp + 0x5c]
and ecx, 0xff
shl ecx, 2
mov ebp, dword [ecx + 0x56e888]
mov ecx, dword [ecx + 0x56ec88]
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x64]
add ecx, edi
add edi, edx
cmp ecx, edi
mov dword [esp + 0x58], ebp
mov dword [esp + 0x20], ecx
jge 0x40c420
mov edi, dword [esp + 0x60]
sub eax, ecx
mov edx, edi
mov ecx, eax
neg edx
imul ecx, edi
mov dword [esp + 0x44], edx
mov edx, ebp
neg edx
imul eax, ebp
mov dword [esp + 0x40], edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x5c], eax
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x5c]
mov ecx, dword [edx]
mov dword [esp + 0x3c], esi
lea edx, [ecx + eax]
add ecx, edi
mov edi, dword [esp + 0x18]
add ecx, eax
mov eax, edx
sub eax, edi
mov edi, eax
imul eax, dword [esp + 0x58]
imul edi, dword [esp + 0x60]
sub edi, ebp
mov ebp, dword [esp + 0x54]
add eax, ebp
cmp edx, ecx
mov ebp, eax
mov dword [esp + 0x64], ebp
jge 0x40c3db
sub ecx, edx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x18]
mov eax, edi
sar eax, 0x10
add eax, ecx
js 0x40c3b5
cmp eax, dword [esp + 0x28]
jge 0x40c3b5
mov ecx, dword [esp + 0x2c]
sar ebp, 0x10
sub ecx, ebp
js 0x40c3b5
cmp ecx, dword [esp + 0x30]
jge 0x40c3b5
push ecx
push eax
mov eax, dword [esp + 0x54]
push eax
call fcn.004d4c80
add esp, 0xc
test ax, ax
je 0x40c3b5
mov ecx, dword [esp + 0x34]
mov dx, word [esi]
shr eax, 5
and eax, 0x1f
mov cx, word [ecx + eax*2]
mov eax, edx
and eax, 0xffff
and ecx, 0xffff
mov edx, eax
mov ebp, ecx
shr edx, 5
and edx, 0x3e0
shr ebp, 0xa
add edx, ebp
mov ebp, ecx
shr ebp, 5
mov dx, word [ebx + edx*2]
mov ebx, eax
and ebp, 0x1f
and ebx, 0x3e0
add ebp, ebx
mov ebx, dword [esp + 0x38]
shl dx, 5
or dx, word [ebx + ebp*2]
and eax, 0x1f
shl eax, 5
and ecx, 0x1f
add eax, ecx
shl edx, 5
or dx, word [ebx + eax*2]
mov word [esi], dx
mov ebp, dword [esp + 0x60]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x1c]
add edi, ebp
mov ebp, dword [esp + 0x64]
add esi, 2
add ebp, edx
dec eax
mov dword [esp + 0x64], ebp
mov dword [esp + 0x1c], eax
jne 0x40c30a
mov eax, dword [esp + 0x3c]
mov ecx, dword [0x557ce4]
mov edx, dword [esp + 0x40]
mov ebp, dword [esp + 0x54]
lea esi, [eax + ecx*2]
mov ecx, dword [esp + 0x5c]
add ecx, edx
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x44]
inc eax
add ebp, ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x20], eax
mov dword [esp + 0x54], ebp
add edx, dword [ecx + 4]
cmp eax, edx
jl 0x40c2bd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret