Function at 0x405200
Capabilities:
Get common file path
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov eax, dword [0x61b660]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x248], eax
cmp dword [ebp - 0x248], 0x12
ja case.default.0x40522f
mov ecx, dword [ebp - 0x248]
jmp dword [ecx*4 + 0x405610]
mov dword [ebp - 4], 5
jmp 0x4052f7
mov dword [ebp - 4], 0xa
jmp 0x4052f7
mov dword [ebp - 4], 3
jmp 0x4052f7
mov dword [ebp - 4], 0
jmp 0x4052f7
mov dword [ebp - 4], 0x10
jmp 0x4052f7
mov dword [ebp - 4], 0x11
jmp 0x4052f7
mov dword [ebp - 4], 0x14
jmp 0x4052f7
mov dword [ebp - 4], 0x13
jmp 0x4052f7
mov dword [ebp - 4], 0x12
jmp 0x4052f7
mov dword [ebp - 4], 4
jmp 0x4052f7
mov dword [ebp - 4], 2
jmp 0x4052f7
mov dword [ebp - 4], 8
jmp 0x4052f7
mov dword [ebp - 4], 9
jmp 0x4052f7
mov dword [ebp - 4], 0xb
jmp 0x4052f7
mov dword [ebp - 4], 7
jmp 0x4052f7
mov dword [ebp - 4], 0x15
jmp 0x4052f7
mov dword [ebp - 4], 0x23
jmp 0x4052f7
mov dword [ebp - 4], 0x17
jmp 0x4052f7
mov dword [ebp - 4], 0x19
jmp 0x4052f7
mov dword [ebp - 4], 5
mov dword [ebp - 8], 0x104
mov byte [ebp - 0x118], 0
push 0x103
push 0
lea edx, [ebp - 0x117]
push edx
call fcn.00529d40
add esp, 0xc
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x4055be
mov edx, dword [ebp - 8]
mov byte [ebp + edx - 0x118], 0
push str.system
lea eax, [ebp - 0x118]
push eax
call fcn.005404ce
add esp, 8
test eax, eax
jne 0x4055be
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x234], 0
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 0
jne 0x4053c5
mov ecx, dword [ebp - 0x240]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
jmp 0x405601
push str.WTSGetActiveConsoleSessionId
mov edx, dword [ebp - 0x240]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
jne 0x4053fa
mov eax, dword [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
jmp 0x405601
mov dword [ebp - 0x120], 0
push str.Wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
jne 0x40543f
mov ecx, dword [ebp - 0x240]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [ebp - 0x124]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
jmp 0x405601
push str.WTSQueryUserToken
mov eax, dword [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
jne 0x405481
mov ecx, dword [ebp - 0x240]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [ebp - 0x124]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
jmp 0x405601
call dword [ebp - 0x234]
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x128]
push eax
mov ecx, dword [ebp - 0x244]
push ecx
call dword [ebp - 0x120]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
jne 0x4054d1
mov edx, dword [ebp - 0x240]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
jmp 0x405601
mov ecx, dword [ebp - 0x128]
push ecx
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
jne 0x40551b
mov edx, dword [ebp - 0x240]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x405601
mov dword [ebp - 0x23c], 0
lea edx, [ebp - 0x23c]
push edx
mov eax, dword [ebp - 4]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
cmp dword [ebp - 0x23c], 0
je 0x405589
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x23c]
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405589
mov eax, dword [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [ebp - 0x128]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov al, 1
jmp 0x405601
mov eax, dword [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [ebp - 0x128]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
xor al, al
jmp 0x405601
mov dword [ebp - 0x11c], 0
lea eax, [ebp - 0x11c]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
cmp dword [ebp - 0x11c], 0
je 0x4055ff
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4055ff
mov al, 1
jmp 0x405601
xor al, al
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0052927b
mov esp, ebp
pop ebp
ret