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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x1001f080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x10021bf8]
push 1
push 0x23
push eax
push 0
mov byte [ebp - 0x45], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
jne 0x1000561f
mov ecx, dword [0x10021bf8]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x1000561f
push 0x10
push eax
push str.Cant_get_remote_storage_folder
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100095c5
mov esp, ebp
pop ebp
ret
mov edx, dword [0x10021bf4]
push ebx
push esi
push edi
push edx
push str._lu
mov ecx, 0x20
lea ebx, [ebp - 0x44]
call fcn.10002a70
add esp, 8
push 0x208
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
test esi, esi
je 0x100057b8
mov edx, dword [0x10021bf8]
mov ecx, esi
call fcn.10003b50
mov edx, 0x104
mov eax, esi
nop
cmp word [eax], 0
je 0x1000567e
add eax, 2
dec edx
jne 0x10005670
jmp 0x1000569d
test edx, edx
je 0x1000569d
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
mov edx, str.RELOADED
call fcn.10002ad0
mov eax, 0x104
mov ecx, esi
cmp word [ecx], 0
je 0x100056b2
add ecx, 2
dec eax
jne 0x100056a4
jmp 0x100056d1
test eax, eax
je 0x100056d1
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
mov edx, 0x100194f4
call fcn.10002ad0
mov edx, 0x104
mov eax, esi
cmp word [eax], 0
je 0x100056e6
add eax, 2
dec edx
jne 0x100056d8
jmp 0x10005706
test edx, edx
je 0x10005706
mov ecx, 0x104
sub ecx, edx
mov edx, dword [0x10021bd8]
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
call fcn.10002ad0
mov edx, 0x104
mov eax, esi
lea ecx, [ecx]
cmp word [eax], 0
je 0x1000571e
add eax, 2
dec edx
jne 0x10005710
jmp 0x1000573b
test edx, edx
je 0x1000573b
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
lea edx, [ebp - 0x44]
call fcn.10002ad0
mov eax, 0x104
mov ecx, esi
cmp word [ecx], 0
je 0x10005750
add ecx, 2
dec eax
jne 0x10005742
jmp 0x1000576f
test eax, eax
je 0x1000576f
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
mov edx, 0x100194f4
call fcn.10002ad0
push esi
call edi
cmp eax, 0xffffffff
je 0x1000577d
mov bl, 1
test al, 0x10
jne 0x10005780
mov bl, byte [ebp - 0x45]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test bl, bl
je 0x100057b8
mov esi, dword [0x10021bf8]
mov eax, 0x104
mov ecx, esi
cmp word [ecx], 0
je 0x100057a6
add ecx, 2
dec eax
jne 0x10005798
jmp 0x100057f2
test eax, eax
je 0x100057f2
mov ecx, 0x104
sub ecx, eax
mov edx, str.RELOADED
jmp 0x100057e3
mov esi, dword [0x10021bf8]
mov edx, 0x104
mov eax, esi
cmp word [eax], 0
je 0x100057d3
add eax, 2
dec edx
jne 0x100057c5
jmp 0x100057f2
test edx, edx
je 0x100057f2
mov ecx, 0x104
sub ecx, edx
mov edx, 0x100194f8
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
call fcn.10002ad0
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 0xffffffff
jne 0x1000580d
push 0
push esi
call ebx
test eax, eax
je 0x100058b3
mov esi, dword [0x10021bf8]
mov eax, 0x104
mov ecx, esi
lea ebx, [ebx]
cmp word [ecx], 0
je 0x1000582e
add ecx, 2
dec eax
jne 0x10005820
jmp 0x1000584d
test eax, eax
je 0x1000584d
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
mov edx, 0x100194f4
call fcn.10002ad0
mov edx, 0x104
mov eax, esi
cmp word [eax], 0
je 0x10005862
add eax, 2
dec edx
jne 0x10005854
jmp 0x10005882
test edx, edx
je 0x10005882
mov ecx, 0x104
sub ecx, edx
mov edx, dword [0x10021bd8]
mov eax, 0x104
sub eax, ecx
lea ecx, [esi + ecx*2]
call fcn.10002ad0
push esi
call edi
cmp eax, 0xffffffff
jne 0x10005893
push 0
push esi
call ebx
test eax, eax
je 0x100058b3
mov esi, dword [0x10021bf8]
lea eax, [ebp - 0x44]
push eax
call fcn.100029c0
push esi
call edi
cmp eax, 0xffffffff
jne 0x100058d7
push 0
push esi
call ebx
test eax, eax
jne 0x100058d7
push 0x10
push 0
push str.Cant_create_folder_for_remote_storage
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100095c5
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10021bf8]
mov ebx, dword [0x10021bf0]
push str.local
push ecx
push 0x10019250
mov ecx, 0x104
call fcn.10002a70
mov esi, dword [0x10021bf0]
push str.Cant_create_folder_for_local_storage
call fcn.10005580
add esp, 0x10
test eax, eax
je 0x100058c4
mov edx, dword [0x10021bf8]
mov ebx, dword [0x10021bd0]
push str.stats
push edx
push 0x10019250
mov ecx, 0x104
call fcn.10002a70
mov esi, dword [0x10021bd0]
push str.Cant_create_stats_folder
call fcn.10005580
add esp, 0x10
test eax, eax
je 0x100058c4
mov eax, dword [0x10021bd0]
mov ebx, dword [0x10021bd4]
push str.stats.ini
push eax
push 0x10019250
mov ecx, 0x104
call fcn.10002a70
mov ecx, dword [0x10021bd0]
mov ebx, dword [0x10021be8]
push str.achievements.ini
push ecx
push 0x10019250
mov ecx, 0x104
call fcn.10002a70
mov esi, dword [0x10021bf8]
add esp, 0x18
push str._storage
call fcn.100029c0
push str.Cant_create_folder_for_remote_storage
call fcn.10005580
mov ecx, dword [ebp - 4]
add esp, 4
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
neg eax
pop ebx
call fcn.100095c5
mov esp, ebp
pop ebp
ret