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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7b7d
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.004ba9c5
push 0x105
lea eax, [ebp - 0x118]
push 0
push eax
call fcn.004a73c0
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 0x46c674
mov dword [esi], 3
jmp 0x46c979
cmp byte [ebp - 0x118], 0
jne 0x46c681
xor ecx, ecx
jmp 0x46c699
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46c690
sub ecx, edx
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x130]
call fcn.00438e80
push 0x4f9f1c
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x148]
call fcn.00470a10
add esp, 4
mov edi, eax
lea eax, [ebp - 0x130]
cmp eax, edi
je 0x46c716
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46c6ef
inc eax
lea ecx, [ebp - 0x130]
push eax
push dword [ebp - 0x130]
call fcn.004339b0
push edi
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.0044b660
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x134]
cmp eax, 0x10
jb 0x46c738
inc eax
lea ecx, [ebp - 0x148]
push eax
push dword [ebp - 0x148]
call fcn.004339b0
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 0x46c77a
call edi
cmp eax, 0xb7
je 0x46c77a
call edi
cmp eax, 5
je 0x46c77a
mov dword [esi], 3
jmp 0x46c979
push str.DeskUpdate
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x148]
call fcn.00470a10
add esp, 4
mov dword [ebp - 0x14c], eax
lea ecx, [ebp - 0x130]
cmp ecx, eax
je 0x46c7e7
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46c7bb
inc eax
push eax
push dword [ebp - 0x130]
call fcn.004339b0
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.0044b660
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x134]
cmp eax, 0x10
jb 0x46c809
inc eax
lea ecx, [ebp - 0x148]
push eax
push dword [ebp - 0x148]
call fcn.004339b0
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 0x46c845
call edi
cmp eax, 0xb7
je 0x46c845
call edi
cmp eax, 5
je 0x46c845
mov dword [esi], 3
jmp 0x46c979
push str.GlobalMgr.db
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x148]
call fcn.00470a10
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x130]
cmp eax, ebx
je 0x46c8af
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46c888
inc eax
lea ecx, [ebp - 0x130]
push eax
push dword [ebp - 0x130]
call fcn.004339b0
push ebx
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.0044b660
mov eax, dword [ebp - 0x134]
cmp eax, 0x10
jb 0x46c8cd
inc eax
lea ecx, [ebp - 0x148]
push eax
push dword [ebp - 0x148]
call fcn.004339b0
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 0x46c909
mov dword [esi], 0x50
jmp 0x46c944
call edi
cmp eax, 2
jne 0x46c973
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 0x46c973
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.004ba736
add esp, 0x10
jmp 0x46c979
mov dword [esi], 0x65f
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x46c997
inc eax
lea ecx, [ebp - 0x130]
push eax
push dword [ebp - 0x130]
call fcn.004339b0
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.004a474b
mov esp, ebp
pop ebp
ret 0x10