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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42793e
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x4350d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x50], edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x48], 0
call fcn.00401670
mov dword [ebp - 0x40], eax
test eax, eax
je 0x41a7eb
mov eax, dword [eax]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x42948c]
mov ecx, dword [ebp - 0x40]
call esi
add eax, 0x10
mov dword [edi], eax
push 0x42ac68
mov ecx, edi
mov dword [ebp - 4], 1
call fcn.00409ee0
test al, al
jne 0x41a63d
push 0
push 0x42ac68
mov ecx, edi
call fcn.0040a3b0
xorps xmm0, xmm0
mov dword [ebp - 0x48], 1
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
movups xmm0, xmmword [0x42ac54]
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 2
push eax
push 0
push 0x8000
lea eax, [ebp - 0x20]
push eax
movups xmmword [ebp - 0x20], xmm0
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jne 0x41a7ce
push 0x104
push dword [ebp - 0x3c]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
push 0x104
push 0x429efc
lea esi, [eax + 1]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
xor ecx, ecx
add eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00424710
push 0x104
push dword [ebp - 0x3c]
mov edi, eax
mov dword [ebp - 0x40], edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
push 0x104
push 0x429efc
mov esi, eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
inc eax
add esp, 0x24
add eax, esi
cmp eax, 0x209
jae 0x41a71c
push 0x104
push dword [ebp - 0x3c]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
push 0x104
push 0x429efc
mov esi, eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
inc eax
add esp, 0x10
add eax, esi
je 0x41a72f
jmp 0x41a721
mov eax, 0x209
sub eax, 1
mov ecx, 0
mov word [edi + eax*2], cx
jne 0x41a721
push dword [ebp - 0x3c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x429efc
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test edi, edi
jne 0x41a74d
xor ecx, ecx
jmp 0x41a761
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41a752
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x44]
push ecx
push edi
mov ecx, esi
call fcn.0040a3b0
mov eax, dword [esi]
sub eax, 0x10
push eax
call fcn.0040a2c0
add esp, 4
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41a792
push eax
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41a7b9
mov edi, dword [esi]
push esi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x42948c]
mov ecx, edi
call esi
mov edi, dword [ebp - 0x40]
push edi
call fcn.0042416e
add esp, 4
push dword [ebp - 0x3c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov edi, dword [ebp - 0x44]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00424160
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00401320
int3