Function at 0x4059d0
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48b3c8
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x4c6018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1a4], eax
xor ebx, ebx
mov eax, 0xf
mov dword [ebp - 0x18c], eax
mov dword [ebp - 0x190], ebx
mov byte [ebp - 0x1a0], bl
mov dword [ebp - 4], ebx
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x13c], ebx
mov byte [ebp - 0x14c], bl
mov dword [ebp - 0x170], eax
mov dword [ebp - 0x174], ebx
mov byte [ebp - 0x184], bl
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x158], ebx
mov byte [ebp - 0x168], bl
push 0x104
lea ecx, [ebp - 0x114]
push ecx
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405a78
sub eax, edx
mov edi, eax
lea eax, [ebp - 0x114]
lea esi, [ebp - 0x1a0]
call fcn.00402610
push 0x104
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405ab0
sub eax, edx
mov edi, eax
lea eax, [ebp - 0x114]
lea esi, [ebp - 0x14c]
call fcn.00402610
push ebx
push 0x26
lea eax, [ebp - 0x114]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405ae6
sub eax, edx
mov edi, eax
lea eax, [ebp - 0x114]
lea esi, [ebp - 0x184]
call fcn.00402610
push 0x104
lea ecx, [ebp - 0x114]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
cmp eax, ebx
jl 0x405b44
jmp 0x405b30
cmp byte [ebp + eax - 0x114], 0x5c
je 0x405b44
dec eax
mov byte [ebp + eax - 0x113], bl
jns 0x405b30
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405b50
sub eax, edx
mov edi, eax
lea eax, [ebp - 0x114]
lea esi, [ebp - 0x168]
call fcn.00402610
mov edi, 9
mov eax, str._Windows_
lea esi, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], ebx
mov byte [ebp - 0x130], bl
call fcn.00402610
lea eax, [ebp - 0x1a0]
push eax
mov eax, dword [ebp - 0x1a4]
mov ebx, esi
mov byte [ebp - 4], 4
call fcn.00405db0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x11c], 0x10
jb 0x405bcc
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [ebp - 0x120], eax
mov byte [ebp - 0x130], al
lea edi, [eax + 0xa]
mov eax, str._System32_
lea esi, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
call fcn.00402610
mov eax, dword [ebp - 0x1a4]
lea edx, [ebp - 0x14c]
push edx
mov ebx, esi
mov byte [ebp - 4], 5
call fcn.00405db0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x11c], 0x10
jb 0x405c2c
mov eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [ebp - 0x120], eax
mov byte [ebp - 0x130], al
lea edi, [eax + 9]
mov eax, str._ProgDir_
lea esi, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
call fcn.00402610
mov eax, dword [ebp - 0x1a4]
lea ecx, [ebp - 0x184]
push ecx
mov ebx, esi
mov byte [ebp - 4], 6
call fcn.00405db0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x11c], 0x10
jb 0x405c8c
mov edx, dword [ebp - 0x130]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [ebp - 0x120], eax
mov byte [ebp - 0x130], al
lea edi, [eax + 9]
mov eax, str._SELFDIR_
lea esi, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
call fcn.00402610
lea eax, [ebp - 0x168]
push eax
mov eax, dword [ebp - 0x1a4]
mov ebx, esi
mov byte [ebp - 4], 7
call fcn.00405db0
mov esi, 0x10
cmp dword [ebp - 0x11c], esi
jb 0x405cec
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp dword [ebp - 0x154], esi
jb 0x405d04
mov edx, dword [ebp - 0x168]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ebx, ebx
mov edi, 0xf
mov dword [ebp - 0x154], edi
mov dword [ebp - 0x158], ebx
mov byte [ebp - 0x168], bl
cmp dword [ebp - 0x170], esi
jb 0x405d35
mov eax, dword [ebp - 0x184]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x170], edi
mov dword [ebp - 0x174], ebx
mov byte [ebp - 0x184], bl
cmp dword [ebp - 0x138], esi
jb 0x405d5f
mov ecx, dword [ebp - 0x14c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x138], edi
mov dword [ebp - 0x13c], ebx
mov byte [ebp - 0x14c], bl
cmp dword [ebp - 0x18c], esi
jb 0x405d89
mov edx, dword [ebp - 0x1a0]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00449013
mov esp, ebp
pop ebp
ret 4