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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x4b93f8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x218], ecx
xor ebx, ebx
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x41076e
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ecx, [ebp - 0x234]
lea esi, [eax + 0x10]
mov dword [ebp - 0x21c], esi
call fcn.00408110
push ecx
mov ecx, esp
push str.pcmasterupgrade
call fcn.00403710
push ecx
mov edi, esp
push ecx
mov ecx, esp
push str.AppData
call fcn.00403710
push edi
lea ecx, [ebp - 0x238]
call fcn.00410780
lea eax, [ebp - 0x214]
push eax
lea ecx, [ebp - 0x238]
call fcn.0042b620
mov ecx, dword [ebp - 0x218]
add ecx, 0x5b4
push eax
mov dword [ebp - 0x210], ecx
call fcn.00409a20
mov edx, dword [ebp - 0x214]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x410529
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x210]
call fcn.0040fe60
add esp, 4
cmp byte [0x4c1042], bl
jne 0x41061e
mov eax, dword [ebp - 0x218]
add eax, 0x594
push 0x4a55a0
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.0040a190
add esp, 0xc
lea ecx, [ebp - 0x21c]
push eax
call fcn.00409a20
mov edx, dword [ebp - 0x214]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41058c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x21c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4105d0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4105d0
nop dword [eax]
cmp ebx, 5
jge 0x4105cd
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x14
mov edi, eax
inc ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
je 0x4105b0
or edi, 0xffffffff
lea ecx, [ebp - 0x224]
call fcn.00402130
mov edx, dword [ebp - 0x224]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4105f8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x41060d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004495f3
mov esp, ebp
pop ebp
ret
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0044c180
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x210]
call fcn.00403710
push 0x4a55a0
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.0040a190
mov edx, dword [ebp - 0x210]
add esp, 0xc
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x410690
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x214]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4106c4
lea edx, [edi - 0x10]
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4105d0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4105d0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x41074b
mov esi, dword [ebp - 0x218]
or edi, 0xffffffff
nop word [eax + eax]
cmp ebx, 5
jge 0x41073f
push 0x4a55a0
lea eax, [esi + 0x594]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0040a190
add esp, 0xc
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, dword [ebp - 0x210]
mov ecx, edi
mov dword [ebp - 0x218], eax
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x41072d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x14
inc ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x218], 0
je 0x4106e0
mov esi, dword [ebp - 0x21c]
mov edi, dword [ebp - 0x214]
lea edx, [edi - 0x10]
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4105d0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4105d0
push 0x80004005
call fcn.00402080
int3