Function at 0x412370
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 0x412770
mov esi, dword [ebp + 0xc]
cmp esi, 1
jl 0x412770
push 0x25
push ebx
call fcn.00414460
add esp, 8
test eax, eax
je 0x412765
push esi
call fcn.00414902
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x412765
jmp 0x4123d0
xor eax, eax
push str._TEMP_
mov ecx, 0x82
lea edi, [esp + 0x1c]
push ebx
rep stosd dword es:[edi], eax
call fcn.0040e560
add esp, 8
test eax, eax
je 0x4124a6
lea eax, [esp + 0x18]
push eax
push 0x207
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov al, byte [esp + 0x18]
test al, al
jne 0x412433
mov edx, dword [0x422cfc]
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 0x4125ea
lea eax, [esp + 0x18]
push str._temp
push eax
call fcn.0040e560
add esp, 8
test eax, eax
jne 0x412492
cmp byte [esp + 0x19], 0x3a
jne 0x41247f
cmp byte [esp + 0x1a], 0x5c
jne 0x41247f
mov dl, byte [0x422cec]
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 0x4125ea
mov eax, dword [str.C:Temp]
mov ecx, dword [0x422cfc]
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 0x4125ea
push str._TMP_
push ebx
call fcn.0040e560
add esp, 8
test eax, eax
je 0x41256b
lea ecx, [esp + 0x18]
push ecx
push 0x207
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov al, byte [esp + 0x18]
test al, al
jne 0x4124fb
mov eax, dword [0x422cfc]
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 0x4125ea
lea ecx, [esp + 0x18]
push str._temp
push ecx
call fcn.0040e560
add esp, 8
test eax, eax
jne 0x41255a
cmp byte [esp + 0x19], 0x3a
jne 0x412546
cmp byte [esp + 0x1a], 0x5c
jne 0x412546
mov al, byte [0x422cec]
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 0x4125ea
mov ecx, dword [str.C:Temp]
mov edx, dword [0x422cfc]
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 0x4125ea
push str._USERNAME_
push ebx
call fcn.0040e560
add esp, 8
test eax, eax
je 0x4125ad
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 0x412750
lea ecx, [esp + 0x18]
push ecx
push str._USERNAME_
jmp 0x4125e5
push str._WINDIR_
push ebx
call fcn.0040e560
add esp, 8
test eax, eax
je 0x41261c
push 0x207
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov al, byte [esp + 0x18]
test al, al
je 0x412750
lea ecx, [esp + 0x18]
push ecx
push str._WINDIR_
mov edx, dword [esp + 0x18]
push edx
push esi
push ebx
call fcn.00412220
add esp, 0x14
test eax, eax
je 0x4123d0
mov ecx, dword [esp + 0x10]
push ecx
mov dword [esp + 0x10], 0xffffffff
call fcn.004143d6
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.0040e560
add esp, 8
test eax, eax
je 0x412706
push 0x207
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov al, byte [esp + 0x18]
test al, al
je 0x412750
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x412655
sub eax, edx
mov esi, eax
cmp esi, 7
jl 0x41267f
lea edi, [esp + esi + 0x11]
push str._system
push edi
call fcn.0041f7a1
add esp, 8
test eax, eax
jne 0x41267f
mov byte [edi], al
jmp 0x4126da
cmp esi, 8
jl 0x41269e
lea edi, [esp + esi + 0x10]
push str._system_
push edi
call fcn.0041f7a1
add esp, 8
test eax, eax
jne 0x41269e
mov byte [edi], al
jmp 0x4126da
cmp esi, 9
jl 0x4126bd
lea edi, [esp + esi + 0xf]
push str._system32
push edi
call fcn.0041f7a1
add esp, 8
test eax, eax
jne 0x4126bd
mov byte [edi], al
jmp 0x4126da
cmp esi, 0xa
jl 0x4126da
lea esi, [esp + esi + 0xe]
push str._system32
push esi
call fcn.0041f7a1
add esp, 8
test eax, eax
jne 0x4126da
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.00412220
add esp, 0x14
test eax, eax
jne 0x4125fc
mov esi, dword [ebp + 0xc]
jmp 0x4123d0
push str._SYSTEMDRIVE_
push ebx
call fcn.0040e560
add esp, 8
test eax, eax
je 0x412758
push 0x207
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov al, byte [esp + 0x18]
test al, al
je 0x412750
cmp byte [esp + 0x19], 0x3a
jne 0x412750
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push str._SYSTEMDRIVE_
mov byte [esp + 0x22], 0
push eax
jmp 0x4125ea
mov dword [esp + 0xc], 1
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004143d6
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