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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0x403a66
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push esi
push edi
mov dword [ebp - 0xc], esp
mov dword [ebp - 8], 0x403648
mov edx, dword [ebp + 8]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
xor eax, eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x3c], eax
call ebx
mov eax, dword [ebp - 0x1c]
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaLenBstr]
push eax
call edi
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
fstp qword [ebp - 0x60]
fld qword [ebp - 0x60]
cmp dword [section..data], 0
jne 0x50c6b4
fdiv qword [0x401eb0]
jmp 0x50c6c5
push dword [0x401eb4]
push dword [0x401eb0]
call sub.MSVBVM60.DLL__adj_fdiv_m64
fnstsw ax
test al, 0xd
jne 0x50c8ff
call dword [sym.imp.MSVBVM60.DLL___vbaR8IntI4]
mov ecx, dword [ebp + 0xc]
mov esi, eax
mov edx, dword [ecx]
lea ecx, [ebp - 0x24]
call ebx
mov edx, dword [ebp - 0x1c]
push edx
call edi
cmp eax, 0x10
jle 0x50c883
mov ecx, dword [ebp - 0x24]
mov eax, esi
sub eax, 5
lea edx, [ebp - 0x3c]
jo 0x50c904
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x1c]
push ecx
push edx
push 1
push eax
mov dword [ebp - 0x3c], 3
call dword [sym.imp.MSVBVM60.DLL_rtcMidCharBstr]
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaStrMove]
mov edx, eax
lea ecx, [ebp - 0x28]
call edi
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaStrCat]
push eax
call ebx
mov edx, eax
lea ecx, [ebp - 0x24]
call edi
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
lea ecx, [ebp - 0x3c]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
mov edx, dword [ebp - 0x24]
mov ecx, esi
sub ecx, 5
lea eax, [ebp - 0x3c]
jo 0x50c904
mov dword [ebp - 0x34], ecx
mov ecx, esi
add ecx, 1
push edx
mov edx, dword [ebp - 0x1c]
push eax
jo 0x50c904
push ecx
push edx
mov dword [ebp - 0x3c], 3
call dword [sym.imp.MSVBVM60.DLL_rtcMidCharBstr]
mov edx, eax
lea ecx, [ebp - 0x28]
call edi
push eax
call ebx
mov edx, eax
lea ecx, [ebp - 0x2c]
call edi
push eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call ebx
mov edx, eax
lea ecx, [ebp - 0x24]
call edi
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x28]
push edx
push eax
push 2
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStrList]
add esp, 0xc
lea ecx, [ebp - 0x3c]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
mov ecx, esi
mov edx, dword [ebp - 0x24]
sub ecx, 5
lea eax, [ebp - 0x3c]
jo 0x50c904
mov dword [ebp - 0x34], ecx
mov ecx, esi
imul ecx, ecx, 2
jo 0x50c904
push edx
mov dword [ebp - 0x3c], 3
push eax
add ecx, 1
mov edx, dword [ebp - 0x1c]
jo 0x50c904
push ecx
push edx
call dword [sym.imp.MSVBVM60.DLL_rtcMidCharBstr]
mov edx, eax
lea ecx, [ebp - 0x28]
call edi
push eax
call ebx
mov edx, eax
lea ecx, [ebp - 0x24]
call edi
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
lea ecx, [ebp - 0x3c]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
imul esi, esi, 3
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
jo 0x50c904
lea ecx, [ebp - 0x3c]
add esi, 1
push eax
push ecx
jo 0x50c904
push esi
push edx
mov dword [ebp - 0x34], 0x80020004
mov dword [ebp - 0x3c], 0xa
call dword [sym.imp.MSVBVM60.DLL_rtcMidCharBstr]
mov edx, eax
lea ecx, [ebp - 0x28]
call edi
push eax
call ebx
mov edx, eax
lea ecx, [ebp - 0x24]
call edi
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
lea ecx, [ebp - 0x3c]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
mov edx, dword [ebp - 0x24]
lea ecx, [ebp - 0x20]
call ebx
wait
push 0x50c8e9
jmp 0x50c8d8
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaStrCat]
mov edx, eax
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVBVM60.DLL___vbaStrMove]
mov edx, dword [ebp - 0x24]
lea ecx, [ebp - 0x20]
call ebx
wait
push 0x50c8e9
jmp 0x50c8d8
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
lea ecx, [ebp - 0x1c]
call esi
lea ecx, [ebp - 0x24]
call esi
ret
jmp 0x403a6c
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop
nop
nop
nop