Function at 0x40c740
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 8
xor ecx, ecx
push ebx
xor eax, eax
mov word [esp + 4], cx
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaI2I4]
mov word [esp + 0x10], ax
mov byte [esp + 0xe], cl
push 0xff
mov ecx, 2
mov byte [esp + 0x16], al
call edi
mov dl, byte [esi]
push eax
push edx
call 0x40c840
push 0xff
mov ecx, 0xfffffffc
mov bl, al
call edi
push eax
mov al, byte [esi + 1]
push eax
call 0x40c840
add bl, al
push 0xff
jb 0x40c838
mov ecx, 0xfffffffe
mov byte [esp + 0x10], bl
call edi
mov cl, byte [esi + 2]
push eax
push ecx
call 0x40c840
push 0xff
mov ecx, 4
mov bl, al
call edi
mov dl, byte [esi + 1]
push eax
push edx
call 0x40c840
add bl, al
push 0xff
jb 0x40c838
xor ecx, ecx
mov byte [esp + 0x11], bl
call edi
push eax
mov al, byte [esi + 3]
push eax
call 0x40c840
push 0xff
mov ecx, 6
mov bl, al
call edi
mov cl, byte [esi + 2]
push eax
push ecx
call 0x40c840
add bl, al
lea edx, [esp + 0xc]
lea eax, [esp + 0x10]
push edx
push eax
push 3
jb 0x40c838
mov byte [esp + 0x1a], bl
call dword [sym.imp.MSVBVM60.DLL___vbaCopyBytes]
pop edi
pop esi
mov eax, dword [esp + 0x10]
mov dx, word [esp + 8]
mov ecx, eax
pop ebx
mov word [ecx], dx
mov dl, byte [esp + 6]
mov byte [ecx + 2], dl
add esp, 8
ret 8
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
cmp word [0x40e064], 0
push ebx
push ebp
push esi
push edi
jne 0x40c89a
push 0
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaRedim]
push 0xff
push 0xfffffffffffffff8
push 8
push 2
push 0x11
push 0x40e05c
push 1
push 0x80
call esi
push 0
push 0xff
push 0xfffffffffffffff8
push 8
push 2
push 0xb
push 0x40e060
push 2
push 0x80
call esi
add esp, 0x48
mov word [0x40e064], 0xffff
mov ecx, dword [0x40e060]
mov ebp, dword [esp + 0x14]
test ecx, ecx
je 0x40c8f5
cmp word [ecx], 2
jne 0x40c8f5
mov edx, dword [ecx + 0x1c]
mov eax, dword [ecx + 0x18]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, ebp
and esi, 0xff
sub esi, edx
cmp esi, eax
jb 0x40c8d0
call ebx
mov ecx, dword [0x40e060]
movsx edi, word [esp + 0x18]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
sub edi, edx
cmp edi, eax
jb 0x40c8e9
call ebx
mov ecx, dword [0x40e060]
mov eax, dword [ecx + 0x18]
imul eax, edi
add eax, esi
shl eax, 1
jmp 0x40c907
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x40e060]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ecx + 0xc]
cmp word [ecx + eax], 0
jne 0x40c9e6
mov eax, dword [0x40e05c]
test eax, eax
je 0x40c96b
cmp word [eax], 2
jne 0x40c96b
mov edx, dword [eax + 0x1c]
mov ecx, dword [eax + 0x18]
mov edi, ebp
and edi, 0xff
sub edi, edx
cmp edi, ecx
jb 0x40c93f
call ebx
mov eax, dword [0x40e05c]
movsx ebx, word [esp + 0x18]
mov edx, dword [eax + 0x14]
mov ecx, dword [eax + 0x10]
sub ebx, edx
cmp ebx, ecx
jb 0x40c95b
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov eax, dword [0x40e05c]
mov esi, dword [eax + 0x18]
imul esi, ebx
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
add esi, edi
jmp 0x40c96f
call ebx
mov esi, eax
mov edi, dword [esp + 0x18]
push edi
push ebp
call fcn.0040ca70
mov edx, dword [0x40e05c]
mov ecx, dword [edx + 0xc]
mov byte [ecx + esi], al
mov ecx, dword [0x40e060]
test ecx, ecx
je 0x40c9d5
cmp word [ecx], 2
jne 0x40c9d5
mov edx, dword [ecx + 0x1c]
mov eax, dword [ecx + 0x18]
mov esi, ebp
and esi, 0xff
sub esi, edx
cmp esi, eax
jb 0x40c9b2
call ebx
mov ecx, dword [0x40e060]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
movsx edi, di
sub edi, edx
cmp edi, eax
jb 0x40c9c9
call ebx
mov ecx, dword [0x40e060]
mov eax, dword [ecx + 0x18]
imul eax, edi
add eax, esi
shl eax, 1
jmp 0x40c9dd
call ebx
mov ecx, dword [0x40e060]
mov edx, dword [ecx + 0xc]
mov word [edx + eax], 0xffff
mov ecx, dword [0x40e05c]
test ecx, ecx
je 0x40ca46
cmp word [ecx], 2
jne 0x40ca46
mov edx, dword [ecx + 0x1c]
mov eax, dword [ecx + 0x18]
and ebp, 0xff
sub ebp, edx
mov edi, ebp
cmp edi, eax
jb 0x40ca12
call ebx
mov ecx, dword [0x40e05c]
movsx esi, word [esp + 0x18]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
sub esi, edx
cmp esi, eax
jb 0x40ca2b
call ebx
mov ecx, dword [0x40e05c]
mov eax, dword [ecx + 0x18]
mov ecx, dword [ecx + 0xc]
imul eax, esi
add eax, edi
pop edi
pop esi
pop ebp
mov al, byte [ecx + eax]
mov cl, byte [esp + 0x10]
and al, cl
pop ebx
ret 0xc
call ebx
mov ecx, dword [0x40e05c]
pop edi
pop esi
pop ebp
mov ecx, dword [ecx + 0xc]
pop ebx
mov al, byte [ecx + eax]
mov cl, byte [esp + 0xc]
and al, cl
ret 0xc