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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x4d4664]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
and dword [ebp - 0x210], ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x214], esi
test edi, edi
je 0x406038
cmp esi, 1
jl 0x406038
push 0x25
push edi
call fcn.00482bc0
pop ecx
pop ecx
test eax, eax
je 0x405d85
push esi
call fcn.004856fc
mov esi, eax
mov dword [ebp - 0x21c], esi
pop ecx
test esi, esi
je 0x405d85
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00481190
push str._TEMP_
push edi
call fcn.00406c9b
add esp, 0x14
test eax, eax
je 0x405d8c
lea eax, [ebp - 0x20c]
push eax
push 0x207
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp byte [ebp - 0x20c], 0
jne 0x405cf0
xor ecx, ecx
mov al, byte [ecx + str.C:Temp]
mov byte [ebp + ecx - 0x20c], al
inc ecx
test al, al
jne 0x405cdc
jmp 0x405d43
lea eax, [ebp - 0x20c]
push str._temp
push eax
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
jne 0x405d43
cmp byte [ebp - 0x20b], 0x3a
jne 0x405d2f
cmp byte [ebp - 0x20a], 0x5c
jne 0x405d2f
xor ecx, ecx
mov al, byte [ecx + str.Temp]
mov byte [ebp + ecx - 0x209], al
inc ecx
test al, al
jne 0x405d1b
jmp 0x405d43
xor ecx, ecx
mov al, byte [ecx + str.C:Temp]
mov byte [ebp + ecx - 0x20c], al
inc ecx
test al, al
jne 0x405d31
lea eax, [ebp - 0x20c]
push eax
push str._TEMP_
push esi
push dword [ebp - 0x214]
push edi
call fcn.00406557
add esp, 0x14
test eax, eax
je 0x405d70
mov dword [ebp - 0x210], 1
or ebx, 0xffffffff
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x405c96
push esi
call fcn.004856f7
pop ecx
mov eax, ebx
jmp 0x40603b
push str._TMP_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
je 0x405e36
lea eax, [ebp - 0x20c]
push eax
push 0x207
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp byte [ebp - 0x20c], 0
jne 0x405dd2
xor ecx, ecx
mov al, byte [ecx + str.C:Temp]
mov byte [ebp + ecx - 0x20c], al
inc ecx
test al, al
jne 0x405dbe
jmp 0x405e25
lea eax, [ebp - 0x20c]
push str._temp
push eax
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
jne 0x405e25
cmp byte [ebp - 0x20b], 0x3a
jne 0x405e11
cmp byte [ebp - 0x20a], 0x5c
jne 0x405e11
xor ecx, ecx
mov al, byte [ecx + str.Temp]
mov byte [ebp + ecx - 0x209], al
inc ecx
test al, al
jne 0x405dfd
jmp 0x405e25
xor ecx, ecx
mov al, byte [ecx + str.C:Temp]
mov byte [ebp + ecx - 0x20c], al
inc ecx
test al, al
jne 0x405e13
lea eax, [ebp - 0x20c]
push eax
push str._TMP_
jmp 0x405d4f
push str._USERNAME_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
je 0x405e83
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 0x207
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp byte [ebp - 0x20c], 0
je 0x405fbb
lea eax, [ebp - 0x20c]
push eax
push str._USERNAME_
jmp 0x405d4f
push str._WINDIR_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
je 0x405ec4
push 0x207
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp byte [ebp - 0x20c], 0
je 0x405fbb
lea eax, [ebp - 0x20c]
push eax
push str._WINDIR_
jmp 0x405d4f
push str._SYSTEMROOT_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
je 0x405fcd
push 0x207
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp byte [ebp - 0x20c], 0
je 0x405fbb
lea esi, [ebp - 0x20c]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x405f01
sub esi, ecx
cmp esi, 7
jl 0x405f2c
lea eax, [ebp + esi - 0x213]
push str._system
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
jne 0x405f2c
add esi, 0xfffffff9
jmp 0x405f90
cmp esi, 8
jl 0x405f4e
lea eax, [ebp + esi - 0x214]
push str._system_
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
jne 0x405f4e
add esi, 0xfffffff8
jmp 0x405f90
cmp esi, 9
jl 0x405f70
lea eax, [ebp + esi - 0x215]
push str._system32
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
jne 0x405f70
add esi, 0xfffffff7
jmp 0x405f90
cmp esi, 0xa
jl 0x405fa4
lea eax, [ebp + esi - 0x216]
push str._system32
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
jne 0x405fa4
add esi, 0xfffffff6
cmp esi, 0x208
jae 0x40604c
mov byte [ebp + esi - 0x20c], 0
mov esi, dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push eax
push str._SYSTEMROOT_
jmp 0x405d4f
xor ecx, ecx
inc ecx
mov dword [ebp - 0x210], ecx
mov ebx, ecx
mov eax, ecx
jmp 0x405d76
push str._SYSTEMDRIVE_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
je 0x40602a
push 0x207
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp byte [ebp - 0x20c], 0
je 0x40601a
cmp byte [ebp - 0x20b], 0x3a
jne 0x40601a
lea eax, [ebp - 0x20c]
mov byte [ebp - 0x20a], 0
push eax
push str._SYSTEMDRIVE_
jmp 0x405d4f
xor eax, eax
inc eax
mov dword [ebp - 0x210], eax
mov ebx, eax
jmp 0x405d76
xor eax, eax
inc eax
mov dword [ebp - 0x210], eax
jmp 0x405d76
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047f259
mov esp, ebp
pop ebp
ret
call fcn.0047f75f
int3