Function at 0x505cf0
Capabilities:
Get common file path
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x617933
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x690
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.005fb8cb
mov ecx, dword [eax + 4]
call fcn.005eedd6
mov eax, dword [0x69c108]
mov dword [esp + 0x6a8], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x6a8], 2
call fcn.00419380
mov eax, dword [0x69c108]
mov dword [esp + 0x24], eax
push 0
lea ecx, [esp + 0x30]
mov byte [esp + 0x6ac], 4
call fcn.004741d0
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x94]
push 0x104
mov bl, 5
push ecx
push 0
mov byte [esp + 0x6b4], bl
call ebp
lea edx, [esp + 0x94]
lea ecx, [esp + 0x24]
push edx
call fcn.005eb27e
lea eax, [esp + 0x94]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x94]
push ecx
lea ecx, [esp + 0x14]
call fcn.005eb27e
push 0x6713a0
lea ecx, [esp + 0x14]
call fcn.005e76aa
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 6
mov ecx, esp
mov dword [esp + 0x20], esp
push str._WindowsFolder
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
lea eax, [esp + 0x94]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x94]
push ecx
lea ecx, [esp + 0x14]
call fcn.005eb27e
push 0x6713a0
lea ecx, [esp + 0x14]
call fcn.005e76aa
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
lea edx, [esp + 0x14]
push edx
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 7
mov ecx, esp
mov dword [esp + 0x1c], esp
push str._SystemFolder
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
lea eax, [esp + 0x94]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x505ec8
lea ecx, [esp + 0x94]
push ecx
lea ecx, [esp + 0x14]
call fcn.005eb27e
push 0x6713a0
lea ecx, [esp + 0x14]
call fcn.005e76aa
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 8
mov ecx, esp
mov dword [esp + 0x1c], esp
jmp 0x505ee8
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.C:Temp
call fcn.005eb163
push ecx
mov byte [esp + 0x6b0], 9
mov ecx, esp
mov dword [esp + 0x1c], esp
push str._TempFolder
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
lea eax, [esp + 0x14]
push 0
push eax
mov ecx, esi
call fcn.005063f0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x6ac], 0xa
call fcn.005eb22e
lea ecx, [esp + 0x14]
mov byte [esp + 0x6a8], bl
call fcn.005eb0f5
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 0xb
mov ecx, esp
mov dword [esp + 0x1c], esp
push str._DesktopFolder
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
lea eax, [esp + 0x14]
push 0x19
push eax
mov ecx, esi
call fcn.005063f0
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x6ac], 0xc
call fcn.005eb22e
lea ecx, [esp + 0x14]
mov byte [esp + 0x6a8], bl
call fcn.005eb0f5
cmp dword [esp + 0x80], 1
jne 0x505fb8
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x20]
call fcn.005eb22e
push ecx
lea edx, [esp + 0x20]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 0xd
mov ecx, esp
mov dword [esp + 0x1c], esp
push str._DesktopFolderCommon
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
lea ecx, [esp + 0x2c]
call fcn.004749a0
push str.LocalMachine
lea ecx, [esp + 0x30]
call fcn.004744a0
push str.SoftwareMicrosoftWindowsCurrentVersion
lea ecx, [esp + 0x30]
call fcn.004744d0
push str.ProgramFilesDir
lea ecx, [esp + 0x30]
call fcn.00474500
push 0
push 0
push 0
push 0
push 0x20019
push 0
lea ecx, [esp + 0x44]
call fcn.00474610
test eax, eax
push ecx
je 0x50607c
mov edi, esp
mov dword [esp + 0x1c], esp
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x6a0f60
call fcn.005eb163
push 1
push 1
push 0
push edi
lea ecx, [esp + 0x44]
call fcn.004749d0
push ecx
mov byte [esp + 0x6b0], 0xe
mov ecx, esp
mov dword [esp + 0x1c], esp
jmp 0x50609b
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.C:Program_Files
call fcn.005eb163
push ecx
mov byte [esp + 0x6b0], 0xf
mov ecx, esp
mov dword [esp + 0x1c], esp
push str._ProgramFilesFolder
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
mov eax, dword [esi + 4]
push ecx
add eax, 0xd0
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 0x10
mov ecx, esp
mov dword [esp + 0x1c], esp
push str._SourceFolder
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esi + 4]
mov edi, dword [eax + 0xd0]
lea ecx, [eax + 0xd0]
mov al, byte [edi]
cmp al, 0x5c
jne 0x506163
cmp byte [edi + 1], 0x5c
jne 0x506163
push 2
push 0x5c
call fcn.005eb5f1
cmp eax, 0xffffffff
je 0x506191
mov ecx, dword [esi + 4]
lea edx, [esp + 0x14]
push eax
push edx
add ecx, 0xd0
call fcn.005e722e
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x6ac], 0x11
call fcn.005eb22e
mov byte [esp + 0x6a8], bl
lea ecx, [esp + 0x14]
jmp 0x50618c
lea eax, [esp + 0x14]
push 2
push eax
call fcn.005e722e
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x6ac], 0x12
call fcn.005eb22e
mov byte [esp + 0x6a8], bl
lea ecx, [esp + 0x14]
call fcn.005eb0f5
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 0x13
mov ecx, esp
mov dword [esp + 0x1c], esp
push str._SourceDrive
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
lea ecx, [esp + 0x10]
call fcn.005eb080
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.SFXSOURCE
call fcn.005eb163
lea eax, [esp + 0x18]
mov byte [esp + 0x6ac], bl
push eax
call fcn.004dd510
mov ecx, eax
call fcn.004f9700
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x6ac], 0x15
call fcn.005eb22e
lea ecx, [esp + 0x14]
mov byte [esp + 0x6a8], bl
call fcn.005eb0f5
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
test eax, eax
jne 0x50624e
lea edx, [esp + 0x398]
push 0x104
push edx
push 0
call ebp
lea eax, [esp + 0x398]
lea ecx, [esp + 0x10]
push eax
call fcn.005eb27e
lea ecx, [esp + 0x198]
lea edx, [esp + 0x298]
push ecx
lea eax, [esp + 0x4a0]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x5a4]
push eax
push ecx
push edx
call fcn.005cf2af
add esp, 0x14
lea eax, [esp + 0x298]
lea ecx, [esp + 0x10]
push eax
call fcn.005eb27e
lea ecx, [esp + 0x198]
push ecx
lea ecx, [esp + 0x14]
call fcn.005eb4d1
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 0x16
mov ecx, esp
mov dword [esp + 0x30], esp
push str._SourceFilename
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], bl
add ecx, 0x60
call fcn.004f1e70
push str.AMS50P
lea ecx, [esp + 0x24]
call fcn.005eb163
push str.AMS70
lea ecx, [esp + 0x24]
mov byte [esp + 0x6ac], 0x17
call fcn.005eb27e
push ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.005eae6a
push ecx
mov byte [esp + 0x6b0], 0x18
mov ecx, esp
mov dword [esp + 0x20], esp
push str._IR_ProductID
call fcn.005eb163
mov ecx, dword [esi + 4]
mov byte [esp + 0x6b0], 0x17
add ecx, 0x60
call fcn.004f1e70
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push str._NoExitScriptOnPageJump
call fcn.005eb163
mov ecx, dword [esi + 4]
add ecx, 0x60
call fcn.004f1f00
lea ecx, [esp + 0x20]
mov byte [esp + 0x6a8], bl
call fcn.005eb0f5
lea ecx, [esp + 0x2c]
mov byte [esp + 0x6a8], 4
call fcn.004756e0
lea ecx, [esp + 0x24]
mov byte [esp + 0x6a8], 3
call fcn.005eb0f5
mov byte [esp + 0x6a8], 2
lea ecx, [esp + 0x58]
call fcn.004195a0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6a8], 1
call fcn.005eb0f5
lea ecx, [esp + 0x10]
mov byte [esp + 0x6a8], 0
call fcn.005eb0f5
mov dword [esp + 0x6a8], 0xffffffff
call fcn.005fb8cb
mov ecx, dword [eax + 4]
call fcn.005eedeb
mov ecx, dword [esp + 0x6a0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x69c
ret