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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005e990
mov eax, dword fs:[0]
push eax
sub esp, 0x144
mov eax, dword [0x1007b00c]
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 - 0x138], 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 dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnset_s]
push 0x105
lea eax, [ebp - 0x118]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
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 0x10031d45
mov dword [esi], 3
jmp 0x1003202c
cmp byte [ebp - 0x118], 0
jne 0x10031d52
xor ecx, ecx
jmp 0x10031d69
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031d60
sub ecx, edx
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x130]
call fcn.100041c0
push 0x10068b60
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x150]
call fcn.10033f20
add esp, 4
mov edi, eax
lea eax, [ebp - 0x130]
cmp eax, edi
je 0x10031de0
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x10031db9
inc eax
push eax
push dword [ebp - 0x130]
call fcn.100043e0
push edi
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.10033c90
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x13c]
cmp eax, 0x10
jb 0x10031dfc
inc eax
push eax
push dword [ebp - 0x150]
call fcn.100043e0
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 0x10031e3e
call edi
cmp eax, 0xb7
je 0x10031e3e
call edi
cmp eax, 5
je 0x10031e3e
mov dword [esi], 3
jmp 0x1003202c
push str.DeskUpdate
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x150]
call fcn.10033f20
add esp, 4
mov dword [ebp - 0x134], eax
lea ecx, [ebp - 0x130]
cmp ecx, eax
je 0x10031eab
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x10031e7f
inc eax
push eax
push dword [ebp - 0x130]
call fcn.100043e0
push dword [ebp - 0x134]
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.10033c90
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x13c]
cmp eax, 0x10
jb 0x10031ec7
inc eax
push eax
push dword [ebp - 0x150]
call fcn.100043e0
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 0x10031f03
call edi
cmp eax, 0xb7
je 0x10031f03
call edi
cmp eax, 5
je 0x10031f03
mov dword [esi], 3
jmp 0x1003202c
push str.GlobalMgr.db
lea edx, [ebp - 0x130]
lea ecx, [ebp - 0x150]
call fcn.10033f20
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x130]
cmp eax, ebx
je 0x10031f67
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x10031f40
inc eax
push eax
push dword [ebp - 0x130]
call fcn.100043e0
push ebx
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.10033c90
mov eax, dword [ebp - 0x13c]
cmp eax, 0x10
jb 0x10031f7f
inc eax
push eax
push dword [ebp - 0x150]
call fcn.100043e0
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 0x10031fbb
mov dword [esi], 0x50
jmp 0x10031ff6
call edi
cmp eax, 2
jne 0x10032026
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 0x10032026
cmp dword [ebp - 0x11c], 0x10
lea eax, [ebp - 0x130]
push 0x104
cmovae eax, dword [ebp - 0x130]
push eax
push 0x105
push dword [ebp - 0x138]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
add esp, 0x10
jmp 0x1003202c
mov dword [esi], 0x65f
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x10032044
inc eax
push eax
push dword [ebp - 0x130]
call fcn.100043e0
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.1005b6db
mov esp, ebp
pop ebp
ret 0x10