Function at 0x47252a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x20
mov eax, dword [0x4fe12c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x472571
mov eax, dword [ebp + 8]
mov al, byte [eax + 4]
and eax, 0xff
and eax, 1
test eax, eax
je 0x472564
mov dword [ebp - 0x20], str.tempin.bin
jmp 0x47256b
mov dword [ebp - 0x20], str.tempin.txt
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov al, byte [eax + 4]
and eax, 0xff
and eax, 1
test eax, eax
je 0x47258c
mov dword [ebp - 0x24], str.tempout.bin
jmp 0x472593
mov dword [ebp - 0x24], str.tempout.txt
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0xc], 0
jne 0x472626
sub esp, 0xc
push 0x104
call fcn.004a2e27
add esp, 0x10
mov dword [ebp - 0xc], eax
sub esp, 8
push dword [ebp - 0xc]
push 0x104
call sub.KERNEL32.dll_GetTempPathA
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4725dd
cmp dword [ebp - 0x18], 0x104
jg 0x4725dd
jmp 0x4725f2
sub esp, 8
push str.c:windows_temp
push dword [ebp - 0xc]
call sub.msvcrt.dll_strcpy
add esp, 0x10
jmp 0x472626
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_strlen
add esp, 0x10
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jle 0x472626
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0xc]
dec eax
cmp byte [eax], 0x5c
jne 0x472626
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0xc]
dec eax
mov byte [eax], 0
lea eax, [ebp - 0x1c]
dec dword [eax]
jmp 0x472603
mov ebx, dword [ebp + 8]
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_strlen
add esp, 4
add eax, 0xc
push eax
call fcn.004a2e27
add esp, 0x10
mov dword [ebx + 0x1c], eax
sub esp, 4
push dword [ebp - 0xc]
push str._sgpg_XXXXXX
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call sub.msvcrt.dll_sprintf
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0xc]
call fcn.004a2f78
add esp, 0x10
sub esp, 0xc
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call fcn.004a87c0
add esp, 0x10
test eax, eax
jne 0x4726bf
sub esp, 4
sub esp, 8
sub esp, 4
call sub.msvcrt.dll__errno
add esp, 4
push dword [eax]
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
push str.cant_create_directory___s:__s_n
call fcn.004a7e84
add esp, 4
push eax
call fcn.0049d87b
add esp, 0x10
jmp 0x472778
mov eax, dword [ebp + 8]
or byte [eax + 4], 4
mov esi, dword [ebp + 8]
sub esp, 0xc
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call sub.msvcrt.dll_strlen
add esp, 4
mov ebx, eax
push dword [ebp - 0x10]
call sub.msvcrt.dll_strlen
add esp, 4
lea eax, [ebx + eax]
add eax, 2
push eax
call fcn.004a2e27
add esp, 0x10
mov dword [esi + 0x20], eax
push dword [ebp - 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
push str._s_s
mov eax, dword [ebp + 8]
push dword [eax + 0x20]
call sub.msvcrt.dll_sprintf
add esp, 0x10
mov eax, dword [ebp + 8]
mov al, byte [eax + 4]
shr al, 1
and eax, 0xff
and eax, 1
test eax, eax
jne 0x472778
mov esi, dword [ebp + 8]
sub esp, 0xc
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call sub.msvcrt.dll_strlen
add esp, 4
mov ebx, eax
push dword [ebp - 0x14]
call sub.msvcrt.dll_strlen
add esp, 4
lea eax, [ebx + eax]
add eax, 2
push eax
call fcn.004a2e27
add esp, 0x10
mov dword [esi + 0x24], eax
push dword [ebp - 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
push str._s_s
mov eax, dword [ebp + 8]
push dword [eax + 0x24]
call sub.msvcrt.dll_sprintf
add esp, 0x10
mov eax, dword [ebp + 8]
mov al, byte [eax + 4]
shr al, 2
and eax, 0xff
and eax, 1
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
sete al
mov edx, 0
mov dl, al
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret