Function at 0x4ec340
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, 0x90
push ebx
push esi
push edi
mov dword [ebp - 8], esp
mov dword [ebp - 4], 0x401350
xor edi, edi
cmp word [0x503124], di
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], edi
jle 0x4ec46a
mov eax, dword [0x503210]
cmp eax, edi
jne 0x4ec3a5
push 0x503210
push 0x406a0c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503210]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x304]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea ecx, [ebp - 0x38]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0xe0]
cmp eax, edi
fnclex
jge 0x4ec3e0
push 0xe0
push 0x40a024
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
xor edx, edx
cmp word [0x503124], 0x4b
lea ecx, [ebp - 0x14]
sete dl
neg edx
xor eax, eax
cmp word [ebp - 0x38], 1
sete al
neg eax
and edx, eax
mov si, dx
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
cmp si, di
je 0x4ec420
mov ecx, dword [0x5031f8]
push ecx
call fcn.0040ada0
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dx, word [0x503124]
mov ax, word [0x503122]
sub dx, 1
jo 0x4ecee5
add ax, 1
mov word [0x503124], dx
jo 0x4ecee5
cmp ax, 7
mov word [0x503122], ax
jne 0x4eceb3
mov word [0x503122], di
push 0x4ececf
wait
jmp 0x4ecece
push 0x25
call fcn.00409bd4
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dword [ebp - 0x38], eax
call edi
movsx eax, word [ebp - 0x38]
push 0x27
mov dword [0x503024], eax
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx ecx, word [ebp - 0x38]
push 0x20
mov dword [0x503028], ecx
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx edx, word [ebp - 0x38]
push 0x5a
mov dword [0x50302c], edx
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx eax, word [ebp - 0x38]
push 0x58
mov dword [0x503034], eax
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx ecx, word [ebp - 0x38]
push 0xd
mov dword [0x503038], ecx
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx edx, word [ebp - 0x38]
push 0x26
mov dword [0x50303c], edx
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx eax, word [ebp - 0x38]
push 0x41
mov dword [0x503040], eax
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx ecx, word [ebp - 0x38]
push 0x53
mov dword [0x503044], ecx
call fcn.00409bd4
mov dword [ebp - 0x38], eax
call edi
movsx edx, word [ebp - 0x38]
mov eax, dword [0x5030d0]
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
push eax
push 0x40cfbc
mov dword [0x503048], edx
call esi
test eax, eax
jne 0x4ec564
mov eax, dword [0x503024]
or ebx, 0xffffffff
cmp eax, ebx
jg 0x4ec567
cmp word [0x503184], 0
jle 0x4ec567
xor ecx, ecx
jmp 0x4ec56c
or ebx, 0xffffffff
mov ecx, 1
fld dword [0x5030b4]
fcomp dword [0x40134c]
fnstsw ax
test ah, 1
jne 0x4ec586
mov eax, 1
jmp 0x4ec588
xor eax, eax
or ecx, eax
jne 0x4ec59c
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 1
push ecx
call fcn.004e9e60
mov edx, dword [0x5030d0]
push edx
push 0x40cfbc
call esi
test eax, eax
jne 0x4ec5c4
cmp dword [0x503028], ebx
jg 0x4ec5c4
cmp word [0x503184], 0
jle 0x4ec5c4
xor ecx, ecx
jmp 0x4ec5c9
mov ecx, 1
fld dword [0x5030b4]
fcomp dword [0x401348]
fnstsw ax
test ah, 0x41
je 0x4ec5e3
mov eax, 1
jmp 0x4ec5e5
xor eax, eax
or ecx, eax
jne 0x4ec5f5
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], ebx
push eax
call fcn.004e9e60
mov ecx, dword [0x5030d0]
push ecx
push 0x40cfbc
call esi
test eax, eax
jne 0x4ec712
cmp dword [0x50302c], ebx
jg 0x4ec712
cmp word [0x503184], 0
jle 0x4ec712
mov eax, dword [0x503210]
test eax, eax
jne 0x4ec643
push 0x503210
push 0x406a0c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503210]
mov edx, dword [eax]
push eax
call dword [edx + 0x304]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
push eax
lea eax, [ebp - 0x14]
push eax
call ebx
mov esi, eax
lea edx, [ebp - 0x38]
push edx
push esi
mov ecx, dword [esi]
call dword [ecx + 0xe0]
test eax, eax
fnclex
jge 0x4ec680
push 0xe0
push 0x40a024
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
xor eax, eax
cmp word [ebp - 0x38], 1
lea ecx, [ebp - 0x14]
sete al
neg eax
mov si, ax
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
test si, si
je 0x4ec6d3
mov eax, dword [0x503178]
movzx cx, byte [eax + 0xc]
movzx dx, byte [eax + 0x18]
add cx, dx
jo 0x4ecee5
movsx esi, cx
cmp esi, 3
jb 0x4ec6c3
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov eax, dword [0x5031b0]
mov ecx, dword [eax + esi*4]
push ecx
call fcn.0040ada0
call edi
cmp word [0x503106], 0
jne 0x4ec6f7
push 0
push 0
push 1
push 0
push 0x5030f4
push 0x14
push 0
call dword [sym.imp.MSVBVM60.DLL___vbaRedim]
add esp, 0x1c
mov edx, 0x40d064
mov ecx, 0x5030d0
mov word [0x5030b0], 6
call dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
jmp 0x4ec718
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov edx, dword [0x5030d0]
push edx
push 0x40cfbc
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
test eax, eax
jne 0x4ec745
cmp dword [0x503034], 0xffffffff
jg 0x4ec745
cmp word [0x503184], 0
jle 0x4ec745
xor ecx, ecx
jmp 0x4ec74a
mov ecx, 1
fld dword [0x5030a0]
fcomp dword [0x401200]
fnstsw ax
test ah, 0x41
je 0x4ec764
mov eax, 1
jmp 0x4ec766
xor eax, eax
or ecx, eax
jne 0x4ec7c0
mov eax, dword [0x503178]
movzx cx, byte [eax]
imul cx, cx, 2
movzx ax, byte [eax + 0x54]
jo 0x4ecee5
imul ax, ax, 2
movsx edx, cx
mov dword [ebp - 0x58], edx
fild dword [ebp - 0x58]
jo 0x4ecee5
movsx ecx, ax
fstp qword [ebp - 0x60]
fld qword [0x401340]
fsub qword [ebp - 0x60]
mov dword [ebp - 0x64], ecx
fild dword [ebp - 0x64]
fstp qword [ebp - 0x6c]
fsub qword [ebp - 0x6c]
fstp dword [0x50309c]
fnstsw ax
test al, 0xd
jne 0x4ecee0
mov eax, dword [0x503010]
test eax, eax
jne 0x4ec7de
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov edx, dword [eax]
push eax
call dword [edx + 0x3a0]
push eax
lea eax, [ebp - 0x14]
push eax
call ebx
mov esi, eax
lea edx, [ebp - 0x3c]
push edx
push esi
mov ecx, dword [esi]
call dword [ecx + 0x80]
test eax, eax
fnclex
jge 0x4ec815
push 0x80
push 0x40bf8c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
fld dword [0x401338]
fsub dword [ebp - 0x3c]
fnstsw ax
test al, 0xd
jne 0x4ecee0
call dword [sym.imp.MSVBVM60.DLL___vbaFpR4]
fcomp dword [0x5030a0]
fnstsw ax
test ah, 0x41
jne 0x4ec842
mov edi, 1
jmp 0x4ec844
xor edi, edi
mov eax, dword [0x5030d0]
push eax
push 0x40cfbc
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
mov esi, eax
mov eax, dword [0x503038]
neg esi
sbb esi, esi
xor ecx, ecx
inc esi
neg esi
cmp word [0x503184], cx
setg cl
neg ecx
and esi, ecx
xor edx, edx
cmp eax, 0xffffffff
lea ecx, [ebp - 0x14]
setle dl
neg edx
and esi, edx
neg edi
and esi, edi
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
test si, si
je 0x4ec8ed
mov eax, dword [0x503178]
movzx cx, byte [eax]
imul cx, cx, 2
movzx ax, byte [eax + 0x54]
jo 0x4ecee5
imul ax, ax, 2
movsx edx, cx
mov dword [ebp - 0x70], edx
fild dword [ebp - 0x70]
jo 0x4ecee5
movsx ecx, ax
fstp qword [ebp - 0x78]
fld qword [ebp - 0x78]
fadd qword [0x401330]
mov dword [ebp - 0x7c], ecx
fild dword [ebp - 0x7c]
fstp qword [ebp - 0x84]
fadd qword [ebp - 0x84]
fstp dword [0x50309c]
fnstsw ax
test al, 0xd
jne 0x4ecee0
mov edx, dword [0x5030d0]
push edx
push 0x40cfbc
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
test eax, eax
jne 0x4ec91a
cmp dword [0x503044], 0xffffffff
jg 0x4ec91a
cmp word [0x503184], 0
jle 0x4ec91a
xor ecx, ecx
jmp 0x4ec91f
mov ecx, 1
fld dword [0x5030a0]
fcomp dword [0x401200]
fnstsw ax
test ah, 0x41
je 0x4ec939
mov eax, 1
jmp 0x4ec93b
xor eax, eax
or ecx, eax
jne 0x4ec955
fld qword [0x401340]
fstp dword [0x50309c]
fnstsw ax
test al, 0xd
jne 0x4ecee0
mov eax, dword [0x503010]
test eax, eax
jne 0x4ec973
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3a0]
lea edx, [ebp - 0x14]
push eax
push edx
call ebx
mov esi, eax
lea ecx, [ebp - 0x3c]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0x80]
test eax, eax
fnclex
jge 0x4ec9aa
push 0x80
push 0x40bf8c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
fld dword [0x401338]
fsub dword [ebp - 0x3c]
fnstsw ax
test al, 0xd
jne 0x4ecee0
call dword [sym.imp.MSVBVM60.DLL___vbaFpR4]
fcomp dword [0x5030a0]
fnstsw ax
test ah, 0x41
jne 0x4ec9d7
mov edi, 1
jmp 0x4ec9d9
xor edi, edi
mov edx, dword [0x5030d0]
push edx
push 0x40cfbc
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
mov esi, eax
neg esi
sbb esi, esi
xor eax, eax
inc esi
neg esi
cmp word [0x503184], ax
setg al
neg eax
and esi, eax
mov eax, dword [0x503048]
xor ecx, ecx
cmp eax, 0xffffffff
setle cl
neg ecx
and esi, ecx
lea ecx, [ebp - 0x14]
neg edi
and esi, edi
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
test si, si
je 0x4eca31
mov dword [0x50309c], 0x3f666666
mov edx, dword [0x5030d0]
push edx
push 0x40cfbc
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
test eax, eax
jne 0x4eca6d
cmp dword [0x50303c], 0xffffffff
jg 0x4eca6d
cmp word [0x503184], 0
jle 0x4eca6d
cmp word [0x503104], 0
jne 0x4eca6d
xor eax, eax
mov edi, 1
jmp 0x4eca74
mov edi, 1
mov eax, edi
mov edx, dword [0x503178]
xor cl, cl
cmp cl, byte [edx + 0x60]
sbb ecx, ecx
inc ecx
or ecx, eax
jne 0x4ecc94
mov eax, dword [0x503210]
test eax, eax
jne 0x4ecaa8
push 0x503210
push 0x406a0c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503210]
mov edx, dword [eax]
push eax
call dword [edx + 0x304]
push eax
lea eax, [ebp - 0x14]
push eax
call ebx
mov esi, eax
lea edx, [ebp - 0x38]
push edx
push esi
mov ecx, dword [esi]
call dword [ecx + 0xe0]
test eax, eax
fnclex
jge 0x4ecadf
push 0xe0
push 0x40a024
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
xor eax, eax
cmp word [ebp - 0x38], di
lea ecx, [ebp - 0x14]
sete al
neg eax
mov si, ax
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
test si, si
je 0x4ecb0d
mov ecx, dword [0x5031ec]
push ecx
call fcn.0040ada0
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov edx, dword [0x503178]
movzx cx, byte [edx + 0x60]
sub cx, di
jo 0x4ecee5
call dword [sym.imp.MSVBVM60.DLL___vbaUI1I2]
mov ecx, dword [0x503178]
mov byte [ecx + 0x60], al
mov eax, dword [0x503010]
test eax, eax
mov word [0x503104], 0x6e
jne 0x4ecb57
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov edx, dword [eax]
push eax
call dword [edx + 0x3a0]
push eax
lea eax, [ebp - 0x14]
push eax
call ebx
mov esi, eax
lea edx, [ebp - 0x3c]
push edx
push esi
mov ecx, dword [esi]
call dword [ecx + 0x80]
test eax, eax
fnclex
jge 0x4ecb8e
push 0x80
push 0x40bf8c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
fld dword [ebp - 0x3c]
cmp dword [section..data], 0
jne 0x4ecba2
fdiv dword [0x4012b8]
jmp 0x4ecbad
push dword [0x4012b8]
call sub.MSVBVM60.DLL__adj_fdiv_m32
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaFpI2]
fadd dword [0x5030a0]
fnstsw ax
test al, 0xd
jne 0x4ecee0
call edi
lea ecx, [ebp - 0x14]
mov word [0x5030f8], ax
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
mov eax, dword [0x503010]
test eax, eax
jne 0x4ecbf2
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3a0]
lea edx, [ebp - 0x14]
push eax
push edx
call ebx
mov esi, eax
lea ecx, [ebp - 0x3c]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0x88]
test eax, eax
fnclex
jge 0x4ecc29
push 0x88
push 0x40bf8c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
fld dword [ebp - 0x3c]
fsub dword [0x4012ec]
fnstsw ax
test al, 0xd
jne 0x4ecee0
call edi
lea ecx, [ebp - 0x14]
mov word [0x5030fa], ax
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x1c], 0x80020004
push edx
mov dword [ebp - 0x24], 0xa
call dword [sym.imp.MSVBVM60.DLL_rtcRandomNext]
fmul dword [0x401328]
fnstsw ax
test al, 0xd
jne 0x4ecee0
call dword [sym.imp.MSVBVM60.DLL___vbaFPInt]
fstp dword [0x503100]
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
call fcn.004fd380
mov edi, 1
mov eax, dword [0x503178]
cmp byte [eax + 0x78], 1
jne 0x4eccac
cmp dword [0x503040], 0xffffffff
jg 0x4eccac
xor esi, esi
jmp 0x4eccae
mov esi, edi
mov ecx, dword [0x5030d0]
push ecx
push 0x40d064
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
neg eax
sbb eax, eax
neg eax
or eax, esi
jne 0x4eccda
mov edx, 0x40d000
mov ecx, 0x5030d0
call dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
fld dword [0x50309c]
fadd dword [0x5030a0]
mov edx, dword [0x50309c]
push edx
fstp dword [0x5030a0]
fnstsw ax
test al, 0xd
jne 0x4ecee0
fld dword [0x50309c]
fstp qword [ebp - 0x8c]
call dword [sym.imp.MSVBVM60.DLL___vbaR4Sgn]
movsx eax, ax
mov dword [ebp - 0x90], eax
fild dword [ebp - 0x90]
fstp qword [ebp - 0x98]
fld qword [ebp - 0x98]
fmul qword [0x401320]
fadd st(0), st(0)
fsubr qword [ebp - 0x8c]
fstp dword [0x50309c]
fnstsw ax
test al, 0xd
jne 0x4ecee0
fld dword [0x50309c]
fabs
fnstsw ax
test al, 0xd
jne 0x4ecee0
fstp dword [ebp - 0x9c]
fld dword [ebp - 0x9c]
call dword [sym.imp.MSVBVM60.DLL___vbaFpR4]
fstp dword [ebp - 0xa0]
fld dword [0x401318]
call dword [sym.imp.MSVBVM60.DLL___vbaFpR4]
fcomp dword [ebp - 0xa0]
fnstsw ax
test ah, 0x41
jne 0x4ecd95
mov dword [0x50309c], 0
mov eax, dword [0x503210]
test eax, eax
jne 0x4ecdb3
push 0x503210
push 0x406a0c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503210]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x304]
lea edx, [ebp - 0x14]
push eax
push edx
call ebx
mov esi, eax
lea ecx, [ebp - 0x38]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0xe0]
test eax, eax
fnclex
jge 0x4ecdea
push 0xe0
push 0x40a024
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov eax, dword [0x503178]
mov dl, byte [eax + 0x54]
mov bl, byte [eax]
add dl, bl
jb 0x4ecee5
xor al, al
cmp al, dl
sbb esi, esi
xor ecx, ecx
neg esi
neg esi
cmp word [ebp - 0x38], di
sete cl
neg ecx
and esi, ecx
lea ecx, [ebp - 0x14]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
test si, si
je 0x4eceb3
fld dword [0x50309c]
fcomp dword [0x401200]
fnstsw ax
test ah, 0x40
jne 0x4ece6c
cmp word [0x5030b2], 0
jne 0x4ece6c
mov edx, dword [0x5031d0]
mov word [0x5030b2], di
push edx
call fcn.0040aecc
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
call esi
mov eax, dword [0x5031d4]
push eax
call fcn.0040ada0
call esi
jmp 0x4ece72
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
fld dword [0x50309c]
fcomp dword [0x401200]
fnstsw ax
test ah, 0x40
je 0x4eceb3
cmp word [0x5030b2], di
jne 0x4eceb3
mov ecx, dword [0x5031d4]
mov word [0x5030b2], 0
push ecx
call fcn.0040aecc
call esi
mov edx, dword [0x5031d0]
push edx
call fcn.0040ada0
call esi
wait
push 0x4ececf
jmp 0x4ecece
ret
jmp 0x40168c
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop
nop
nop