Function at 0x4074f0
Capabilities:
Check if file exists
Check os version
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51e94e
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
mov eax, dword [0x575c78]
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 + 0x10]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc4], ebx
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xc0], edi
call fcn.0040ba39
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x407558
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebx], eax
mov dword [ebp - 4], edi
mov edi, 1
mov dword [ebp - 0xc0], edi
call fcn.0040ba39
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40758e
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xb8], eax
mov dword [ebp - 4], edi
test esi, esi
jne 0x4075ab
xor eax, eax
jmp 0x4075b9
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4075b0
sub eax, edx
push eax
push esi
mov ecx, ebx
call fcn.004016a0
mov eax, dword [ebx]
push 0x5c
push eax
call fcn.00508099
add esp, 8
test eax, eax
je 0x40761d
sub eax, dword [ebx]
js 0x40761d
inc eax
push eax
lea ecx, [ebp - 0xb4]
push ecx
mov ecx, ebx
call fcn.00407370
push eax
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 2
call fcn.004019a0
mov eax, dword [ebp - 0xb4]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40761d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x9c
lea ecx, [ebp - 0xac]
push 0
push ecx
call fcn.00507060
add esp, 0xc
lea edx, [ebp - 0xac]
push edx
mov dword [ebp - 0xac], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40781b
mov eax, dword [ebp - 0x9c]
cmp eax, 2
ja 0x407670
jne 0x40781b
cmp dword [ebp - 0xa8], 6
jb 0x40781b
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x40781b
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40781b
lea ecx, [ebp - 0xb0]
call fcn.00401570
lea eax, [ebp - 0xb4]
push eax
push 0
push 0
push 0x554eb8
mov byte [ebp - 4], 3
call esi
test eax, eax
js 0x4077f5
mov ecx, dword [ebp - 0xb4]
push ecx
lea ecx, [ebp - 0xb0]
call fcn.004072e0
mov edx, dword [ebp - 0xb4]
mov edi, dword [sym.imp.ole32.dll_CoTaskMemFree]
push edx
call edi
lea eax, [ebp - 0xb4]
push eax
push 0
push 0
push 0x554e98
call esi
test eax, eax
js 0x4077f5
mov ecx, dword [ebp - 0xb4]
push ecx
lea ecx, [ebp - 0xb0]
call fcn.004072e0
mov edx, dword [ebp - 0xb4]
push edx
call edi
push 0x52ce14
lea ecx, [ebp - 0xb0]
call fcn.004074b0
mov eax, dword [ebp - 0xbc]
push eax
lea ecx, [ebp - 0xb0]
call fcn.004074b0
mov ecx, dword [ebp - 0xb0]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ecx
call edi
test eax, eax
jne 0x40776f
push eax
lea ecx, [ebp - 0xb0]
call fcn.004070a0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [ebp - 0xb0]
push edx
call fcn.00407050
add esp, 4
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0xbc]
push 0x52ce14
push ecx
call fcn.004073a0
add esp, 0xc
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 4
call fcn.00407220
lea ecx, [ebp - 0xbc]
mov byte [ebp - 4], 3
call fcn.00401420
mov esi, dword [ebp - 0xb0]
push esi
call edi
test eax, eax
jne 0x4077de
push eax
lea ecx, [ebp - 0xb0]
call fcn.004070a0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov esi, dword [ebp - 0xb0]
push esi
call fcn.00407050
add esp, 4
push esi
call edi
test eax, eax
je 0x4077fb
lea edx, [ebp - 0xb0]
push edx
mov ecx, ebx
call fcn.004019a0
jmp 0x4077fb
mov esi, dword [ebp - 0xb0]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40781b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0xb8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407841
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.00506356
mov esp, ebp
pop ebp
ret