Function at 0x1013be70
Capabilities:
Get common file path

Disassembly:
sub esp, 0xc14
mov eax, dword [0x10291440]
xor eax, esp
mov dword [esp + 0xc10], eax
mov eax, dword [esp + 0xc1c]
push esi
mov esi, dword [esp + 0xc1c]
push edi
mov edi, dword [esi]
test al, 4
jne 0x1013beaf
test al, 8
je 0x1013bfa8
call fcn.10004a60
test eax, eax
je 0x1013bfa8
lea eax, [esp + 0x14]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 0x400
push eax
push str.TMPDIR
push esi
call fcn.1013bc10
add esp, 0x10
test eax, eax
jne 0x1013c149
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x1013bee7
cmp byte [ecx], al
jne 0x1013bf83
lea eax, [esp + 0x14]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 0x400
push eax
push str.TEMP
push esi
call fcn.1013bc10
add esp, 0x10
test eax, eax
jne 0x1013c149
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x1013bf1b
cmp byte [ecx], al
jne 0x1013bf83
lea eax, [esp + 0x14]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 0x400
push eax
push 0x10272220
push esi
call fcn.1013bc10
add esp, 0x10
test eax, eax
jne 0x1013c149
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x1013bf4f
cmp byte [ecx], al
jne 0x1013bf83
lea eax, [esp + 0x14]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 0x400
push eax
push str.TempFolder
push esi
call fcn.1013bc10
add esp, 0x10
test eax, eax
jne 0x1013c149
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x1013bfa8
cmp byte [ecx], al
je 0x1013bfa8
lea eax, [edi + 0x48]
push eax
push ecx
push esi
call fcn.100dc8f0
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0xc10]
xor ecx, esp
call fcn.1021eb98
add esp, 0xc14
ret
push ebx
push ebp
lea eax, [esp + 0x41c]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 2
jbe 0x1013c0bd
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x41c]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call ebx
mov ebp, eax
mov dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
push ebp
push esi
call fcn.100dc800
add esp, 0xc
test eax, eax
jne 0x1013c147
push eax
push eax
push ebp
push dword [esp + 0x20]
lea eax, [esp + 0x42c]
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call ebx
test eax, eax
jne 0x1013c03c
call fcn.100f3810
push eax
call fcn.100f3830
add esp, 4
test eax, eax
jne 0x1013c147
mov edx, dword [esp + 0x14]
mov ecx, edx
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1013c045
sub ecx, ebx
lea eax, [ecx + edx]
mov cl, byte [eax - 1]
cmp cl, 0x5c
je 0x1013c05e
cmp cl, 0x2f
jne 0x1013c066
mov byte [eax - 1], 0
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push edx
push esi
call fcn.101586b0
add esp, 0xc
test eax, eax
jne 0x1013c0ab
cmp dword [esp + 0x18], eax
je 0x1013c0ab
lea eax, [edi + 0x48]
push eax
push dword [esp + 0x18]
push esi
call fcn.100dc8f0
mov ecx, dword [esp + 0x20]
add esp, 0xc
mov edi, eax
test ecx, ecx
je 0x1013c0a4
push ecx
push esi
call fcn.100dc7e0
add esp, 8
mov eax, edi
jmp 0x1013c147
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1013c0bd
push eax
push esi
call fcn.100dc7e0
add esp, 8
lea eax, [esp + 0x18]
push eax
push str._temp
push esi
call fcn.101586b0
add esp, 0xc
test eax, eax
jne 0x1013c0e5
cmp dword [esp + 0x18], eax
je 0x1013c0e5
lea eax, [edi + 0x48]
push eax
push str._temp
jmp 0x1013c13e
lea eax, [esp + 0x18]
push eax
push str.C:_temp
push esi
call fcn.101586b0
add esp, 0xc
test eax, eax
jne 0x1013c10d
cmp dword [esp + 0x18], eax
je 0x1013c10d
lea eax, [edi + 0x48]
push eax
push str.C:_temp
jmp 0x1013c13e
lea eax, [esp + 0x18]
push eax
push str.C:_tmp
push esi
call fcn.101586b0
add esp, 0xc
test eax, eax
jne 0x1013c135
cmp dword [esp + 0x18], eax
je 0x1013c135
lea eax, [edi + 0x48]
push eax
push str.C:_tmp
jmp 0x1013c13e
lea eax, [edi + 0x48]
push eax
push 0x10282d89
push esi
call fcn.100dc8f0
add esp, 0xc
pop ebp
pop ebx
mov ecx, dword [esp + 0xc18]
pop edi
pop esi
xor ecx, esp
call fcn.1021eb98
add esp, 0xc14
ret