Function at 0x42f82b
Capabilities:
Check os version
Create directory
Get common file path

Disassembly:
push 0x3b8
mov eax, 0x43df99
call fcn.004380ee
mov esi, edx
mov dword [ebp - 0x3b0], esi
mov edi, ecx
mov dword [ebp - 0x3ac], edi
mov dword [ebp - 0x3b8], edi
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x3b4], edi
xor ebx, ebx
push 0x444535
mov dword [ebp - 0x3b4], eax
call fcn.00402815
mov dword [ebp - 4], ebx
cmp byte [ebp + 0x10], bl
je 0x42f88b
push 9
push str.ProjectX
lea ecx, [ebp - 0x260]
call fcn.004044fc
push str.Shell32.dll
mov dword [ebp - 0x3c0], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 0x3bc], ebx
test ebx, ebx
je 0x42f8ba
push str.SHGetKnownFolderPath
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3c0], eax
push 0x110
lea eax, [ebp - 0x3a4]
mov byte [ebp - 4], 1
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x3a8], 0x114
lea eax, [ebp - 0x3a8]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x3a4], 6
jb 0x42fab8
cmp esi, 8
ja case.default.0x42f8fd
jmp dword [esi*4 + 0x42fc5f]
mov esi, 0x43ff2c
jmp 0x42f93a
mov esi, 0x43fedc
jmp 0x42f93a
mov esi, 0x43ff0c
jmp 0x42f93a
mov esi, 0x43fecc
jmp 0x42f93a
mov esi, 0x43febc
jmp 0x42f93a
mov esi, 0x43feec
jmp 0x42f93a
mov esi, 0x43feac
jmp 0x42f93a
mov esi, 0x43ff1c
lea edi, [ebp - 0x228]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x3b0]
mov edi, dword [ebp - 0x3ac]
and dword [ebp - 0x3b8], 0
mov ecx, dword [ebp - 0x3c0]
test ecx, ecx
je 0x42fab8
lea eax, [ebp - 0x3b8]
push eax
movzx eax, byte [ebp + 8]
push 0
shl eax, 0xf
push eax
lea eax, [ebp - 0x228]
push eax
call ecx
cmp eax, 0x80004001
je 0x42fab8
push dword [ebp - 0x3b8]
lea ecx, [ebp - 0x3ac]
call fcn.00416061
mov byte [ebp - 4], 2
lea eax, [ebp - 0x260]
cmp dword [ebp - 0x24c], 0xf
lea ecx, [ebp - 0x3ac]
cmova eax, dword [ebp - 0x260]
push eax
call fcn.0042fd03
push 0x44c2a8
lea ecx, [ebp - 0x3ac]
call fcn.0042fd03
cmp byte [ebp + 8], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x42f9fa
push 0
push dword [ebp - 0x3ac]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x42f9fa
call esi
cmp eax, 0xb7
jne 0x42fc21
mov eax, dword [ebp - 0x3b4]
test eax, eax
je 0x42fa57
push eax
lea ecx, [ebp - 0x3ac]
call fcn.0042fd03
cmp byte [ebp + 8], 0
je 0x42fa57
push 0
push dword [ebp - 0x3ac]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x42fa57
call esi
cmp eax, 0xb7
je 0x42fa57
call esi
push eax
push dword [ebp - 0x3ac]
lea eax, [ebp - 0x290]
push str.Failed_to_create_subdirectory__S__error_d
push eax
call fcn.0040f0a4
add esp, 0x10
mov byte [ebp - 4], 4
jmp 0x42fc42
push dword [ebp - 0x3ac]
lea ecx, [ebp - 0x3b0]
call fcn.00416061
lea ecx, [ebp - 0x3b0]
mov byte [ebp - 4], 5
call fcn.0042fcd3
push dword [ebp - 0x3b0]
mov ecx, edi
call fcn.0040bc27
lea ecx, [ebp - 0x3b0]
call fcn.00402b3c
lea ecx, [ebp - 0x3ac]
call fcn.00402b3c
test ebx, ebx
je 0x42faa5
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [ebp - 0x260]
call fcn.004027a6
mov eax, edi
call fcn.0043809d
ret
movzx eax, byte [ebp + 8]
lea edx, [ebp - 0x260]
shl eax, 0xf
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x3b8], eax
call fcn.0040eeb3
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x3b4]
test eax, eax
je 0x42fb3c
push eax
lea ecx, [ebp - 0x230]
call fcn.00402815
lea edx, [ebp - 0x230]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x248]
call fcn.0040eeb3
mov byte [ebp - 4], 8
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x42fb13
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x278]
call fcn.0040c0ef
lea ecx, [ebp - 0x248]
call fcn.00402ab8
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 6
call fcn.004027a6
cmp esi, 8
ja case.0x42fb41.7
jmp dword [esi*4 + 0x42fc83]
push 0x1c
pop ecx
jmp 0x42fb6b
push 0x23
jmp 0x42fb4a
push 2
jmp 0x42fb4a
push 0x17
jmp 0x42fb4a
push 0x26
jmp 0x42fb4a
xor ecx, ecx
jmp 0x42fb6b
push 0x1a
jmp 0x42fb4a
mov ecx, dword [ebp - 0x3b4]
cmp dword [ebp - 0x264], 7
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x278]
cmova eax, dword [ebp - 0x278]
or ecx, dword [ebp - 0x3b8]
push eax
xor eax, eax
push eax
push eax
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
test eax, eax
jne 0x42fc06
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x3b4]
call fcn.00416061
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x3b0]
push dword [ebp - 0x3b4]
call fcn.00416061
lea ecx, [ebp - 0x3b0]
mov byte [ebp - 4], 0xa
call fcn.0042fcd3
push dword [ebp - 0x3b0]
mov ecx, edi
call fcn.0040bc27
lea ecx, [ebp - 0x3b0]
call fcn.00402b3c
lea ecx, [ebp - 0x3b4]
call fcn.00402b3c
lea ecx, [ebp - 0x278]
call fcn.00402ab8
jmp 0x42fa9a
push eax
lea eax, [ebp - 0x290]
push str.Bad_result_from_SHGetFolderPathAndSubDirW_d
push eax
call fcn.0040f0a4
add esp, 0xc
mov byte [ebp - 4], 0xb
jmp 0x42fc42
call esi
push eax
push dword [ebp - 0x3ac]
lea eax, [ebp - 0x290]
push str.Failed_to_create_directory__S__error_d
push eax
call fcn.0040f0a4
add esp, 0x10
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x23c]
call fcn.00405d7a
push 0x456dc8
lea eax, [ebp - 0x23c]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
add al, 0xf9
inc edx
add byte [ebx], cl
stc
inc edx
add byte [edx], dl
stc
inc edx
add byte [ecx], bl
stc
inc edx
add byte [edi], ah
stc
inc edx
add byte [eax], ah
stc
inc edx
add byte [esi], ch
stc
inc edx
add byte [0x40042f9], dh
stc
inc edx
add byte [eax - 5], cl
inc edx
add byte [eax - 5], cl
inc edx
add byte [ebp - 5], cl
inc edx
add byte [ecx - 5], dl
inc edx
add byte [ebp - 5], dl
inc edx
add byte [ecx - 5], bl
inc edx
add byte [ebp - 5], bl
inc edx
add byte [ebp - 5], ah
inc edx
add byte [ecx - 5], ah
inc edx
add byte [ebx + 0x33], dl
push ebx
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x42fccf
push eax
mov bl, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
pop ebx
ret