Function at 0x40ed70
Capabilities:
Get common file path
Get program files directory
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416892
mov eax, dword fs:[0]
push eax
sub esp, 0x6c8
mov eax, dword [0x41c140]
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, ecx
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push 0
push 0x26
push eax
push 0
call esi
push 0
push 0x2a
lea eax, [ebp - 0x420]
push eax
push 0
call esi
xorps xmm0, xmm0
mov dword [ebp - 0x678], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x674], 0
movups xmmword [ebp - 0x688], xmm0
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40edf0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x688]
call fcn.004011f0
push str.Rockstar_Games_
lea ecx, [ebp - 0x688]
mov dword [ebp - 4], 0
call fcn.004057e0
xorps xmm0, xmm0
mov dword [ebp - 0x648], 0
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x644], 0
movups xmmword [ebp - 0x658], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ee50
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x658]
call fcn.004011f0
push str.Rockstar_Games_
lea ecx, [ebp - 0x658]
mov byte [ebp - 4], 1
call fcn.004057e0
xorps xmm0, xmm0
mov dword [ebp - 0x690], 0
xor eax, eax
mov dword [ebp - 0x68c], 7
movups xmmword [ebp - 0x6a0], xmm0
mov word [ebp - 0x6a0], ax
movups xmmword [ebp - 0x640], xmm0
mov dword [ebp - 0x630], eax
mov dword [ebp - 0x62c], 7
mov word [ebp - 0x640], ax
push 0x104
lea eax, [ebp - 0x628]
mov byte [ebp - 4], 3
push eax
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea esi, [edi + 0x380]
test eax, eax
je 0x40efa1
lea ecx, [ebp - 0x628]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ef00
sub ecx, edx
lea eax, [ebp - 0x628]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x640]
call fcn.00401cb0
push str.Rockstar_Games_
lea ecx, [ebp - 0x640]
call fcn.004057e0
push str.Social_Club_
lea ecx, [ebp - 0x640]
call fcn.004057e0
push 0xc3
lea eax, [ebp - 0x640]
push eax
push 0x417f7c
lea ecx, [ebp - 0x6d4]
call fcn.0040d5c0
mov ecx, dword [edi + 0x384]
mov byte [ebp - 4], 4
push eax
cmp ecx, dword [edi + 0x388]
je 0x40ef7f
call fcn.0040d540
add dword [edi + 0x384], 0x34
jmp 0x40ef87
push ecx
mov ecx, esi
call fcn.0040c3a0
lea ecx, [ebp - 0x6bc]
mov byte [ebp - 4], 3
call fcn.00401c30
lea ecx, [ebp - 0x6d4]
call fcn.00401c30
lea eax, [ebp - 0x658]
push eax
lea ecx, [ebp - 0x670]
call fcn.004031b0
push str.Social_Club_
lea ecx, [ebp - 0x670]
mov byte [ebp - 4], 5
call fcn.004057e0
push 0xe2
lea eax, [ebp - 0x670]
push eax
push 0x417f84
lea ecx, [ebp - 0x6d4]
call fcn.0040d5c0
mov ecx, dword [esi + 4]
mov byte [ebp - 4], 6
push eax
cmp ecx, dword [esi + 8]
je 0x40effb
call fcn.0040d540
add dword [esi + 4], 0x34
jmp 0x40f003
push ecx
mov ecx, esi
call fcn.0040c3a0
lea ecx, [ebp - 0x6bc]
call fcn.00401c30
lea ecx, [ebp - 0x6d4]
call fcn.00401c30
mov ecx, dword [ebp - 0x65c]
cmp ecx, 8
jb 0x40f059
mov edx, dword [ebp - 0x670]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40f04f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f15e
push ecx
push edx
call fcn.004149eb
add esp, 8
mov ecx, dword [ebp - 0x62c]
xor eax, eax
mov dword [ebp - 0x660], 0
mov dword [ebp - 0x65c], 7
mov word [ebp - 0x670], ax
cmp ecx, 8
jb 0x40f0b6
mov edx, dword [ebp - 0x640]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40f0ac
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f15e
push ecx
push edx
call fcn.004149eb
add esp, 8
mov ecx, dword [ebp - 0x644]
xor eax, eax
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x62c], 7
mov word [ebp - 0x640], ax
cmp ecx, 8
jb 0x40f10f
mov edx, dword [ebp - 0x658]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40f105
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f15e
push ecx
push edx
call fcn.004149eb
add esp, 8
mov ecx, dword [ebp - 0x674]
xor eax, eax
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 7
mov word [ebp - 0x658], ax
cmp ecx, 8
jb 0x40f16e
mov edx, dword [ebp - 0x688]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40f164
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f164
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004149eb
add esp, 8
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.004149f9
mov esp, ebp
pop ebp
ret