Function at 0x4ef100
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push 0x401686
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push esi
push edi
mov dword [ebp - 8], esp
mov dword [ebp - 4], 0x401388
mov eax, dword [0x503098]
lea ecx, [ebp - 0x50]
xor edi, edi
push eax
push ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x50], edi
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
mov ecx, dword [ebp - 0x50]
cmp ecx, edi
je 0x4ef17e
cmp word [ecx], 1
jne 0x4ef17e
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov esi, dword [edx]
mov edx, dword [ecx + 0x14]
sub esi, edx
cmp esi, eax
jb 0x4ef171
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x50]
lea eax, [esi + esi*2]
shl eax, 3
sub eax, esi
shl eax, 2
jmp 0x4ef187
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x50]
mov esi, dword [ecx + 0xc]
add esi, eax
mov eax, dword [0x503094]
cmp eax, edi
je 0x4ef1d4
cmp word [eax], 1
jne 0x4ef1d4
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVBVM60.DLL___vbaVarVargNofree]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaI4Var]
mov edi, eax
mov eax, dword [0x503094]
mov edx, dword [eax + 0x14]
mov ecx, dword [eax + 0x10]
sub edi, edx
cmp edi, ecx
jb 0x4ef1c7
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
lea ebx, [edi + edi*2]
shl ebx, 3
sub ebx, edi
shl ebx, 2
jmp 0x4ef1dc
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ebx, eax
mov ecx, dword [0x503098]
test ecx, ecx
je 0x4ef216
cmp word [ecx], 1
jne 0x4ef216
mov eax, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
mov edi, dword [eax]
mov eax, dword [ecx + 0x10]
sub edi, edx
cmp edi, eax
jb 0x4ef209
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
lea eax, [edi + edi*2]
shl eax, 3
sub eax, edi
shl eax, 2
jmp 0x4ef222
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
mov edx, dword [0x503094]
mov ecx, dword [ecx + 0xc]
add ecx, eax
mov edx, dword [edx + 0xc]
add edx, ebx
push edx
push ecx
push 0x4099e4
call dword [sym.imp.MSVBVM60.DLL___vbaRecAssign]
mov ecx, dword [0x503098]
test ecx, ecx
je 0x4ef279
cmp word [ecx], 1
jne 0x4ef279
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov edi, dword [edx]
mov edx, dword [ecx + 0x14]
sub edi, edx
cmp edi, eax
jb 0x4ef26c
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
lea eax, [edi + edi*2]
shl eax, 3
sub eax, edi
shl eax, 2
jmp 0x4ef285
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
mov edx, dword [ecx + 0xc]
mov ax, word [edx + eax + 0x38]
cmp ax, word [0x503188]
jle 0x4ef339
mov eax, dword [0x503094]
test eax, eax
je 0x4ef2ce
cmp word [eax], 1
jne 0x4ef2ce
mov edi, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
neg edi
cmp edi, edx
jb 0x4ef2c1
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
lea ebx, [edi + edi*2]
shl ebx, 3
sub ebx, edi
shl ebx, 2
jmp 0x4ef2dc
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
mov ebx, eax
test ecx, ecx
je 0x4ef310
cmp word [ecx], 1
jne 0x4ef310
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov edi, dword [edx]
mov edx, dword [ecx + 0x14]
sub edi, edx
cmp edi, eax
jb 0x4ef303
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
lea eax, [edi + edi*2]
shl eax, 3
sub eax, edi
shl eax, 2
jmp 0x4ef31c
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503098]
mov edx, dword [0x503094]
mov ecx, dword [ecx + 0xc]
add ecx, eax
mov edx, dword [edx + 0xc]
add edx, ebx
push edx
push ecx
push 0x4099e4
call dword [sym.imp.MSVBVM60.DLL___vbaRecAssign]
call fcn.00409c2c
mov dword [ebp - 0x38], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x24], 3
call dword [sym.imp.MSVBVM60.DLL_rtcRandomize]
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
lea ecx, [ebp - 0x24]
call edi
lea ecx, [ebp - 0x24]
mov ebx, 0xa
push ecx
mov dword [ebp - 0x1c], 0x80020004
mov dword [ebp - 0x24], ebx
call dword [sym.imp.MSVBVM60.DLL_rtcRandomNext]
fstp dword [ebp - 0x38]
mov dx, word [esi + 2]
sub dx, word [esi]
jo 0x4ef616
movsx eax, dx
mov dword [ebp - 0x5c], eax
fild dword [ebp - 0x5c]
fstp dword [ebp - 0x60]
fld dword [ebp - 0x60]
fmul dword [ebp - 0x38]
fnstsw ax
test al, 0xd
jne 0x4ef611
call dword [sym.imp.MSVBVM60.DLL___vbaFPInt]
movsx ecx, word [esi]
mov dword [ebp - 0x64], ecx
fild dword [ebp - 0x64]
fstp dword [ebp - 0x68]
fadd dword [ebp - 0x68]
fadd dword [0x401230]
fnstsw ax
test al, 0xd
jne 0x4ef611
call dword [sym.imp.MSVBVM60.DLL___vbaFpI2]
lea ecx, [ebp - 0x24]
mov word [esi + 0x26], ax
call edi
lea edx, [ebp - 0x24]
mov dword [ebp - 0x1c], 0x80020004
push edx
mov dword [ebp - 0x24], ebx
call dword [sym.imp.MSVBVM60.DLL_rtcRandomNext]
mov eax, dword [0x503010]
fstp dword [ebp - 0x3c]
test eax, eax
jne 0x4ef417
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3ac]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov edi, eax
lea ecx, [ebp - 0x38]
push ecx
push edi
mov eax, dword [edi]
call dword [eax + 0x80]
test eax, eax
fnclex
jge 0x4ef452
push 0x80
push 0x40bf8c
push edi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
xor ebx, ebx
mov bl, byte [esi + 0x52]
cmp ebx, 2
jb 0x4ef462
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
xor edx, edx
mov dl, byte [esi + 0x52]
mov edi, edx
cmp edi, 2
jb 0x4ef474
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
fld dword [ebp - 0x3c]
fadd st(0), st(0)
fnstsw ax
test al, 0xd
jne 0x4ef611
call dword [sym.imp.MSVBVM60.DLL___vbaFPInt]
mov eax, dword [0x50306c]
mov cx, word [eax + edi*2]
imul cx, cx, 2
jo 0x4ef616
movsx edx, cx
mov dword [ebp - 0x6c], edx
fild dword [ebp - 0x6c]
movsx eax, word [eax + ebx*2]
fstp dword [ebp - 0x70]
fld dword [ebp - 0x70]
fadd dword [ebp - 0x38]
mov dword [ebp - 0x74], eax
fmulp st(1)
fild dword [ebp - 0x74]
fstp dword [ebp - 0x78]
fsub dword [ebp - 0x78]
fnstsw ax
test al, 0xd
jne 0x4ef611
call dword [sym.imp.MSVBVM60.DLL___vbaFpI2]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
lea ecx, [ebp - 0x14]
mov word [esi + 0x24], ax
call ebx
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
mov eax, dword [0x503010]
test eax, eax
jne 0x4ef506
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3ac]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov edi, eax
lea ecx, [ebp - 0x38]
push ecx
push edi
mov eax, dword [edi]
call dword [eax + 0x80]
test eax, eax
fnclex
jge 0x4ef541
push 0x80
push 0x40bf8c
push edi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
movsx edx, word [esi + 0x24]
mov dword [ebp - 0x7c], edx
push ecx
fild dword [ebp - 0x7c]
fstp dword [ebp - 0x80]
fld dword [ebp - 0x38]
fsub dword [ebp - 0x80]
fnstsw ax
test al, 0xd
jne 0x4ef611
fstp dword [esp]
call dword [sym.imp.MSVBVM60.DLL___vbaR4Sgn]
imul ax, word [esi + 4]
jo 0x4ef616
lea ecx, [ebp - 0x14]
mov word [esi + 4], ax
call ebx
cmp word [esi + 4], 0
jge 0x4ef5ce
movzx ax, byte [esi + 0x52]
imul ax, ax, 7
movzx dx, byte [esi + 0x16]
mov cx, 9
jo 0x4ef616
sub cx, ax
jo 0x4ef616
sub cx, dx
jo 0x4ef616
call dword [sym.imp.MSVBVM60.DLL___vbaUI1I2]
mov byte [esi + 0x16], al
mov cx, 9
movzx ax, byte [esi + 0x52]
imul ax, ax, 7
jo 0x4ef616
sub cx, ax
mov word [esi + 0x2e], 1
jo 0x4ef616
sub cx, word [esi + 0x1e]
jo 0x4ef616
mov word [esi + 0x1e], cx
lea edx, [ebp - 0x50]
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
wait
push 0x4ef5fe
jmp 0x4ef5f3
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
ret
jmp 0x40168c
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop
nop