Function at 0x46d480
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d8fad
mov eax, dword fs:[0]
push eax
sub esp, 0x144
mov eax, dword [0x511070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
or ebx, 0xffffffff
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
push 0x104
push 0
push 0x105
mov dword [ebp - 4], 0
push eax
mov dword [esi], 0
call fcn.004bb93b
push 0x105
lea eax, [ebp - 0x118]
push 0
push eax
call fcn.004a83c0
add esp, 0x1c
lea eax, [ebp - 0x118]
push eax
push 0
push 0
push 0x801a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jns 0x46d534
mov dword [esi], 3
jmp 0x46d839
cmp byte [ebp - 0x118], 0
jne 0x46d541
xor ecx, ecx
jmp 0x46d559
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46d550
sub ecx, edx
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x130]
call fcn.00438c00
push 0x4fa22c
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x148]
call fcn.00472190
add esp, 4
mov edi, eax
lea eax, [ebp - 0x130]
cmp eax, edi
je 0x46d5d6
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46d5af
inc eax
lea ecx, [ebp - 0x130]
push eax
push dword [ebp - 0x130]
call fcn.00433760
push edi
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.0044e280
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x134]
cmp eax, 0x10
jb 0x46d5f8
inc eax
lea ecx, [ebp - 0x148]
push eax
push dword [ebp - 0x148]
call fcn.00433760
cmp dword [ebp - 0x11c], 0x10
lea eax, [ebp - 0x130]
push 0
cmovae eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x46d63a
call edi
cmp eax, 0xb7
je 0x46d63a
call edi
cmp eax, 5
je 0x46d63a
mov dword [esi], 3
jmp 0x46d839
push str.DeskUpdate
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x148]
call fcn.00472190
add esp, 4
mov dword [ebp - 0x14c], eax
lea ecx, [ebp - 0x130]
cmp ecx, eax
je 0x46d6a7
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46d67b
inc eax
push eax
push dword [ebp - 0x130]
call fcn.00433760
push dword [ebp - 0x14c]
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.0044e280
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x134]
cmp eax, 0x10
jb 0x46d6c9
inc eax
lea ecx, [ebp - 0x148]
push eax
push dword [ebp - 0x148]
call fcn.00433760
cmp dword [ebp - 0x11c], 0x10
lea eax, [ebp - 0x130]
push 0
cmovae eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x46d705
call edi
cmp eax, 0xb7
je 0x46d705
call edi
cmp eax, 5
je 0x46d705
mov dword [esi], 3
jmp 0x46d839
push str.GlobalMgr.db
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x148]
call fcn.00472190
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x130]
cmp eax, ebx
je 0x46d76f
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46d748
inc eax
lea ecx, [ebp - 0x130]
push eax
push dword [ebp - 0x130]
call fcn.00433760
push ebx
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.0044e280
mov eax, dword [ebp - 0x134]
cmp eax, 0x10
jb 0x46d78d
inc eax
lea ecx, [ebp - 0x148]
push eax
push dword [ebp - 0x148]
call fcn.00433760
cmp dword [ebp - 0x11c], 0x10
lea eax, [ebp - 0x130]
push 0
cmovae eax, dword [ebp - 0x130]
push 0x80
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x46d7c9
mov dword [esi], 0x50
jmp 0x46d804
call edi
cmp eax, 2
jne 0x46d833
cmp dword [ebp - 0x11c], 0x10
lea eax, [ebp - 0x130]
push 0
cmovae eax, dword [ebp - 0x130]
push 0x80
push 2
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x46d833
cmp dword [ebp - 0x11c], 0x10
lea eax, [ebp - 0x130]
push 0x104
cmovae eax, dword [ebp - 0x130]
push eax
push 0x105
push dword [ebp - 0x150]
call fcn.004bb6ac
add esp, 0x10
jmp 0x46d839
mov dword [esi], 0x65f
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46d857
inc eax
lea ecx, [ebp - 0x130]
push eax
push dword [ebp - 0x130]
call fcn.00433760
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a578d
mov esp, ebp
pop ebp
ret 0x10