Function at 0x459193
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Move file

Disassembly:
push 0x4c4
mov eax, 0x531885
call fcn.004e4550
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x21c]
xor ebx, ebx
push ebx
push 0x1a
push eax
push ebx
mov dword [ebp - 0x4d0], ebx
call esi
test eax, eax
jne 0x4591fe
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.GetBasePsiphonDataDir
push str._s___SHGetFolderPath__roaming__failed___d_
push ebx
push ebx
call fcn.00439ccd
add esp, 0x14
mov dword [0x5eb600], 7
xor eax, eax
mov dword [0x5eb5fc], ebx
mov word [0x5eb5ec], ax
mov eax, 0x5eb5ec
jmp 0x459479
push 1
push 0x1c
lea eax, [ebp - 0x424]
push eax
push ebx
call esi
test eax, eax
jne 0x459223
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.GetBasePsiphonDataDir
push str._s___SHGetFolderPath__local__failed___d_
jmp 0x4591d2
mov esi, 0x5ac918
lea ecx, [ebp - 0x484]
push esi
call fcn.004466d0
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], ebx
push eax
lea ecx, [ebp - 0x4b4]
call fcn.004466d0
lea ecx, [ebp - 0x484]
mov byte [ebp - 4], 1
push ecx
mov edx, eax
lea ecx, [ebp - 0x46c]
call fcn.0042a9fd
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x4b4]
call fcn.004277fa
push ebx
push 1
lea ecx, [ebp - 0x484]
mov byte [ebp - 4], 4
call fcn.004277fa
push esi
lea ecx, [ebp - 0x49c]
call fcn.004466d0
lea eax, [ebp - 0x424]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x4cc]
call fcn.004466d0
lea ecx, [ebp - 0x49c]
mov byte [ebp - 4], 6
push ecx
mov edx, eax
lea ecx, [ebp - 0x454]
call fcn.0042a9fd
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x4cc]
call fcn.004277fa
push ebx
push 1
lea ecx, [ebp - 0x49c]
call fcn.004277fa
xor eax, eax
mov dword [ebp - 0x428], 7
mov dword [ebp - 0x42c], ebx
mov word [ebp - 0x43c], ax
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x454]
cmp dword [ebp - 0x440], 8
mov edi, dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmovae eax, dword [ebp - 0x454]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xffffffff
je 0x459326
test al, 0x10
je 0x459326
push 0xffffffffffffffff
jmp 0x4593a0
cmp dword [ebp - 0x458], 8
lea eax, [ebp - 0x46c]
cmovae eax, dword [ebp - 0x46c]
push eax
call edi
or edi, 0xffffffff
cmp eax, edi
je 0x45939f
test al, 0x10
je 0x45939f
cmp dword [ebp - 0x440], 8
lea ecx, [ebp - 0x454]
push 0xb
cmovae ecx, dword [ebp - 0x454]
lea eax, [ebp - 0x46c]
cmp dword [ebp - 0x458], 8
push ecx
cmovae eax, dword [ebp - 0x46c]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
test eax, eax
jne 0x45939f
call esi
push eax
push str.GetBasePsiphonDataDir
push str._s:_MigratePsiphonDataDir_failed_to_move_roaming_to_local___d_
push 1
push ebx
call fcn.00439ccd
add esp, 0x14
lea eax, [ebp - 0x46c]
push edi
jmp 0x4593a6
push edi
lea eax, [ebp - 0x454]
push ebx
push eax
lea ecx, [ebp - 0x43c]
call fcn.0042625b
cmp dword [ebp - 0x428], 8
lea eax, [ebp - 0x43c]
push ebx
cmovae eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x45943a
call esi
cmp eax, 0xb7
je 0x45943a
call esi
push eax
push str.GetBasePsiphonDataDir
push str._s___create_directory_failed___d_
push ebx
push ebx
call fcn.00439ccd
add esp, 0x14
mov dword [0x5eb600], 7
xor eax, eax
mov dword [0x5eb5fc], ebx
lea ecx, [ebp - 0x43c]
mov word [0x5eb5ec], ax
push ebx
push 1
call fcn.004277fa
push ebx
push 1
lea ecx, [ebp - 0x454]
call fcn.004277fa
push ebx
push 1
lea ecx, [ebp - 0x46c]
call fcn.004277fa
jmp 0x4591f4
lea eax, [ebp - 0x43c]
mov esi, 0x5eb5ec
push eax
mov ecx, esi
call fcn.004255fe
push ebx
push 1
lea ecx, [ebp - 0x43c]
call fcn.004277fa
push ebx
push 1
lea ecx, [ebp - 0x454]
call fcn.004277fa
push ebx
push 1
lea ecx, [ebp - 0x46c]
call fcn.004277fa
mov eax, esi
call fcn.004e44fa
ret