Function at 0x404ad0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x800
mov ecx, 0x200
xor eax, eax
push esi
push edi
lea edi, [esp + 8]
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
push 5
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov eax, dword [esp + 0x80c]
test eax, eax
jne 0x404b86
lea edi, [esp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push str.logbasescript.txt
lea ecx, [esp + ecx + 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [esp + 0x10]
push 0x40be10
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x404b44
pop edi
pop esi
add esp, 0x800
ret 4
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
push str.expect_60__login:__n
push esi
call edi
mov eax, dword [0x40c518]
push eax
push str.output___sM__n
push esi
call edi
push str.expect_60__Password:__n
push esi
call edi
mov ecx, dword [0x40c538]
push ecx
push str.output___sM_
push esi
call edi
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x2c
jmp 0x404d42
cmp eax, 1
jne 0x404c47
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
push str.logbasescript.vbs
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + ecx + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x10]
push 0x40be10
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x404bd1
pop edi
pop esi
add esp, 0x800
ret 4
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
push str._language___VBScript__n
push esi
call edi
push str._interface___1.0__n_n
push esi
call edi
push str.Sub_Main_n
push esi
call edi
push str._tcrt.Screen.Synchronous__True__n
push esi
call edi
push str._tcrt.Screen.WaitForString__login:__n
push esi
call edi
mov ecx, dword [0x40c518]
push ecx
push str._tcrt.Screen.Send___s___VbCr_n
push esi
call edi
push str._tcrt.Screen.WaitForString__password:__n
push esi
call edi
mov edx, dword [0x40c538]
push edx
push str._tcrt.Screen.Send___s___VbCr_n
push esi
call edi
add esp, 0x48
push str._tcrt.Screen.Synchronous__False_n
push esi
call edi
push str.End_Sub_n
push esi
call edi
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
jmp 0x404d42
cmp eax, 3
jne 0x404d42
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
push str.logbasescript.vbs
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x10]
push 0x40be10
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x404c92
pop edi
pop esi
add esp, 0x800
ret 4
mov eax, dword [0x40c50c]
push str._bin
push eax
call dword [sym.imp.MSVCRT.dll__mbsstr]
add esp, 8
test eax, eax
je 0x404cad
mov byte [eax], 0
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
push str.set_objShell__CreateObject__Wscript.Shell___n
push esi
call edi
push str.objShell.Run_cmd__k__n
push esi
call edi
push str.wscript.Sleep_200_n
push esi
call edi
mov eax, dword [0x40c530]
push eax
push eax
push str.objShell.SendKeys__SET_INFORMIXSERVER_sENTER__n
push esi
call edi
push str.wscript.Sleep_200_n
push esi
call edi
mov edx, dword [0x40c50c]
push edx
push str.objShell.SendKeys__SET_INFORMIXDIR_sENTER__n
push esi
call edi
push str.wscript.Sleep_200_n
push esi
call edi
add esp, 0x44
push str.objShell.SendKeys__dbaccess____ENTER__n
push esi
call edi
push str.wscript.Sleep_200_n
push esi
call edi
mov eax, dword [0x40c518]
mov ecx, dword [0x40c530]
push eax
push ecx
push str.objShell.SendKeys__connect_to___s_user__s_ENTER__n
push esi
call edi
push str.wscript.Sleep_600_n
push esi
call edi
mov edx, dword [0x40c538]
push edx
push str.objShell.SendKeys___sENTER__n
push esi
call edi
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x38
lea eax, [esp + 8]
push eax
push 0x40b11c
push 0x40c504
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov eax, 1
pop edi
pop esi
add esp, 0x800
ret 4