Function at 0x530dd0
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x579cfa
mov eax, dword fs:[0]
push eax
sub esp, 0x378
mov eax, dword [0x5d52e0]
xor eax, esp
mov dword [esp + 0x370], eax
push ebx
push esi
push edi
mov eax, dword [0x5d52e0]
xor eax, esp
push eax
lea eax, [esp + 0x388]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
xor edi, edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x24], edi
call fcn.0040c84f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x530e45
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x390], edi
cmp dword [ebp + 0x10], edi
je 0x5310f6
push 0x5a95c8
lea ecx, [esp + 0x18]
call fcn.00401210
push 0x5a95c8
lea ecx, [esp + 0x24]
mov byte [esp + 0x394], 1
call fcn.00401210
mov byte [esp + 0x390], 2
cmp esi, edi
jle 0x530f79
push ebx
mov ecx, esi
lea edi, [esp + 0x28]
call fcn.00530ca0
add esp, 4
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x394], 3
call fcn.004015b0
mov byte [esp + 0x390], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x530ee2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, 0xa0009
je 0x530f2d
cmp esi, 0x6020000
jne 0x530f79
push ebx
mov edx, esi
call fcn.0054e0a0
push ebx
mov ecx, eax
lea edi, [esp + 0x28]
call fcn.00530ca0
add esp, 4
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x394], 4
call fcn.004015b0
mov byte [esp + 0x390], 2
mov eax, dword [esp + 0x24]
jmp 0x530f5d
push ebx
mov ecx, 0x23c2
lea edi, [esp + 0x2c]
call fcn.00530ca0
add esp, 4
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x394], 5
call fcn.004015b0
mov byte [esp + 0x390], 2
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x530f79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x530f8b
push eax
lea ecx, [esp + 0x18]
call fcn.004015b0
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x530f97
xor ecx, ecx
jmp 0x530f9a
mov ecx, dword [eax + 0x20]
xor edx, edx
cmp esi, 0xa0009
sete dl
lea ebx, [esp + 0x14]
push edx
lea edx, [esp + 0x24]
call fcn.0052bed0
add esp, 4
test eax, eax
jne 0x531052
mov esi, dword [esp + 0x30]
push 0x5a95c8
mov ecx, esi
call fcn.00401210
mov byte [esp + 0x390], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x530ff6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x390], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x53101e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x390], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x531383
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x531383
mov eax, dword [esp + 0x14]
mov ebx, 1
cmp dword [eax - 4], ebx
jle 0x531071
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401af0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.004ff818
add esp, 8
test eax, eax
js 0x5310ec
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx - 8]
jg 0x5310ec
mov dword [ecx - 0xc], eax
mov ecx, dword [esp + 0x14]
xor edx, edx
mov word [ecx + eax*2], dx
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
call fcn.004015b0
mov byte [esp + 0x390], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5310d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x390], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
jmp 0x53132d
push 0x80070057
call fcn.004010a0
push edi
mov ecx, 0x239f
lea edi, [esp + 0x30]
call fcn.00530ca0
add esp, 4
push 1
push 0
mov byte [esp + 0x398], 6
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x34]
push ecx
push esi
push 0x101000
push 0
push 0
push 1
lea ecx, [esp + 0x54]
call fcn.0041e683
mov byte [esp + 0x390], 7
call fcn.0040c84f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x531154
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x1c], edi
mov bl, 8
mov byte [esp + 0x390], bl
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x531193
push 0x104
lea ecx, [esp + 0x20]
call fcn.004019b0
mov edi, dword [esp + 0x1c]
push 0
push 0x26
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x5310ec
cmp eax, dword [edi - 8]
jg 0x5310ec
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
lea ecx, [esp + 0x34]
call fcn.004385dd
lea ecx, [esp + 0x34]
mov dword [eax + 0x2c], edi
call fcn.0041ef2a
cmp eax, 1
je 0x531280
mov ebx, dword [esp + 0x30]
push 0x5a95c8
mov ecx, ebx
call fcn.00401210
add edi, 0xfffffff0
mov byte [esp + 0x390], 7
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x531219
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x390], 6
call fcn.0041e5c8
lea eax, [esi - 0x10]
mov byte [esp + 0x390], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x53124e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x390], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x531279
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x531385
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x38]
call fcn.0041f07a
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x394], 9
call fcn.004015b0
mov byte [esp + 0x390], bl
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x5312c7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x18]
call fcn.0052db30
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
jne 0x5312ed
push 0x5a95c8
lea ecx, [esp + 0x1c]
call fcn.004012d0
add edi, 0xfffffff0
mov byte [esp + 0x390], 7
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x531311
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x390], 6
call fcn.0041e5c8
mov byte [esp + 0x390], 0
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x531346
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x18]
add edi, 0xfffffff0
push edi
call fcn.00401a10
mov esi, dword [esp + 0x34]
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov dword [esp + 0x390], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x531383
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, esi
mov ecx, dword [esp + 0x388]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x370]
xor ecx, esp
call fcn.004ff57c
mov esp, ebp
pop ebp
ret