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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x214
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
push esi
push edi
mov dword [esp + 0xc], 0
je 0x409d00
mov esi, dword [ebp + 0xc]
cmp esi, 1
jl 0x409d00
push 0x25
push ebx
call fcn.004129d0
add esp, 8
test eax, eax
je 0x409cf5
push esi
call fcn.004131d5
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x409cf5
jmp 0x409960
xor eax, eax
push str._TEMP_
mov ecx, 0x82
lea edi, [esp + 0x1c]
push ebx
rep stosd dword es:[edi], eax
call fcn.0040b150
add esp, 8
test eax, eax
je 0x409a36
lea eax, [esp + 0x18]
push eax
push 0x207
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov al, byte [esp + 0x18]
test al, al
jne 0x4099c3
mov edx, dword [0x420398]
mov ecx, dword [str.C:Temp]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x18]
push edx
push str._TEMP_
mov dword [esp + 0x20], ecx
push eax
jmp 0x409b7a
lea eax, [esp + 0x18]
push str._temp
push eax
call fcn.0040b150
add esp, 8
test eax, eax
jne 0x409a22
cmp byte [esp + 0x19], 0x3a
jne 0x409a0f
cmp byte [esp + 0x1a], 0x5c
jne 0x409a0f
mov dl, byte [0x420388]
mov ecx, dword [str.Temp]
mov eax, dword [esp + 0x10]
mov byte [esp + 0x1f], dl
lea edx, [esp + 0x18]
push edx
push str._TEMP_
mov dword [esp + 0x23], ecx
push eax
jmp 0x409b7a
mov eax, dword [str.C:Temp]
mov ecx, dword [0x420398]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push str._TEMP_
push eax
jmp 0x409b7a
push str._TMP_
push ebx
call fcn.0040b150
add esp, 8
test eax, eax
je 0x409afb
lea ecx, [esp + 0x18]
push ecx
push 0x207
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov al, byte [esp + 0x18]
test al, al
jne 0x409a8b
mov eax, dword [0x420398]
mov edx, dword [str.C:Temp]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
push str._TMP_
mov dword [esp + 0x20], edx
push ecx
jmp 0x409b7a
lea ecx, [esp + 0x18]
push str._temp
push ecx
call fcn.0040b150
add esp, 8
test eax, eax
jne 0x409aea
cmp byte [esp + 0x19], 0x3a
jne 0x409ad6
cmp byte [esp + 0x1a], 0x5c
jne 0x409ad6
mov al, byte [0x420388]
mov edx, dword [str.Temp]
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x1f], al
lea eax, [esp + 0x18]
push eax
push str._TMP_
mov dword [esp + 0x23], edx
push ecx
jmp 0x409b7a
mov ecx, dword [str.C:Temp]
mov edx, dword [0x420398]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push str._TMP_
push ecx
jmp 0x409b7a
push str._USERNAME_
push ebx
call fcn.0040b150
add esp, 8
test eax, eax
je 0x409b3d
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x1c], 0x207
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov al, byte [esp + 0x18]
test al, al
je 0x409ce0
lea ecx, [esp + 0x18]
push ecx
push str._USERNAME_
jmp 0x409b75
push str._WINDIR_
push ebx
call fcn.0040b150
add esp, 8
test eax, eax
je 0x409bac
push 0x207
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov al, byte [esp + 0x18]
test al, al
je 0x409ce0
lea ecx, [esp + 0x18]
push ecx
push str._WINDIR_
mov edx, dword [esp + 0x18]
push edx
push esi
push ebx
call fcn.004097b0
add esp, 0x14
test eax, eax
je 0x409960
mov ecx, dword [esp + 0x10]
push ecx
mov dword [esp + 0x10], 0xffffffff
call fcn.004130bd
mov eax, dword [esp + 0x10]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str._SYSTEMROOT_
push ebx
call fcn.0040b150
add esp, 8
test eax, eax
je 0x409c96
push 0x207
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov al, byte [esp + 0x18]
test al, al
je 0x409ce0
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409be5
sub eax, edx
mov esi, eax
cmp esi, 7
jl 0x409c0f
lea edi, [esp + esi + 0x11]
push str._system
push edi
call fcn.00412134
add esp, 8
test eax, eax
jne 0x409c0f
mov byte [edi], al
jmp 0x409c6a
cmp esi, 8
jl 0x409c2e
lea edi, [esp + esi + 0x10]
push str._system_
push edi
call fcn.00412134
add esp, 8
test eax, eax
jne 0x409c2e
mov byte [edi], al
jmp 0x409c6a
cmp esi, 9
jl 0x409c4d
lea edi, [esp + esi + 0xf]
push str._system32
push edi
call fcn.00412134
add esp, 8
test eax, eax
jne 0x409c4d
mov byte [edi], al
jmp 0x409c6a
cmp esi, 0xa
jl 0x409c6a
lea esi, [esp + esi + 0xe]
push str._system32
push esi
call fcn.00412134
add esp, 8
test eax, eax
jne 0x409c6a
mov byte [esi], al
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x18]
push ecx
push str._SYSTEMROOT_
push edx
push eax
push ebx
call fcn.004097b0
add esp, 0x14
test eax, eax
jne 0x409b8c
mov esi, dword [ebp + 0xc]
jmp 0x409960
push str._SYSTEMDRIVE_
push ebx
call fcn.0040b150
add esp, 8
test eax, eax
je 0x409ce8
push 0x207
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov al, byte [esp + 0x18]
test al, al
je 0x409ce0
cmp byte [esp + 0x19], 0x3a
jne 0x409ce0
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push str._SYSTEMDRIVE_
mov byte [esp + 0x22], 0
push eax
jmp 0x409b7a
mov dword [esp + 0xc], 1
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004130bd
add esp, 4
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret