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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
cmp word [esi], 0
je 0x1016506d
push 0x2f
push esi
call fcn.10213523
add esp, 8
test eax, eax
je 0x10164bb9
xor ecx, ecx
mov word [eax], cx
push 0x10232298
push esi
call fcn.10213505
add esp, 8
test eax, eax
je 0x10164bd0
xor ecx, ecx
mov word [eax], cx
cmp word [esi], 0x22
push edi
jne 0x10164c20
mov edx, 0x104
mov ecx, esi
mov edi, edi
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10164c07
movzx edi, word [ecx + 2]
test di, di
je 0x10164c00
mov word [ecx], di
add ecx, 2
sub edx, 1
jne 0x10164be0
jmp 0x10164c04
test edx, edx
jne 0x10164c07
sub ecx, 2
xor eax, eax
push 0x22
push esi
mov word [ecx], ax
call fcn.102135d7
add esp, 8
test eax, eax
je 0x10164c20
xor ecx, ecx
mov word [eax], cx
push str..exe
push esi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x10164c36
xor ecx, ecx
mov word [eax + 8], cx
push 4
push str.___
push esi
call fcn.10213631
add esp, 0xc
test eax, eax
jne 0x10164c7b
mov ecx, 0x104
nop
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [esi + 8]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10164c50
jmp 0x10165064
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.102134e7
push 0xb
push str._systemroot
push esi
call fcn.10213547
add esp, 0x18
test eax, eax
jne 0x10164cfb
lea eax, [esi + 0x16]
push eax
push ebx
push 0x1021c6b4
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.1000bd10
lea edx, [ebp - 0x20c]
add esp, 0x14
mov ecx, 0x104
sub edx, esi
lea ecx, [ecx]
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [edx + esi]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10164cd0
jmp 0x10165064
push 9
push str.system32_
push esi
call fcn.10213547
add esp, 0xc
test eax, eax
jne 0x10164d6b
push esi
push ebx
push 0x1021b408
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.1000bd10
lea edx, [ebp - 0x20c]
add esp, 0x14
mov ecx, 0x104
sub edx, esi
jmp 0x10164d40
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [edx + esi]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10164d40
jmp 0x10165064
push 0xd
push str._SystemRoot__
push esi
call fcn.10213547
add esp, 0xc
test eax, eax
jne 0x10164ddb
lea eax, [esi + 0x1a]
push eax
push ebx
push 0x1021b408
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.1000bd10
lea edx, [ebp - 0x20c]
add esp, 0x14
mov ecx, 0x104
sub edx, esi
lea ebx, [ebx]
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [esi + edx]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10164db0
jmp 0x10165064
push 9
push str._WinDir__
push esi
call fcn.10213547
add esp, 0xc
test eax, eax
jne 0x10164e4b
lea eax, [esi + 0x12]
push eax
push ebx
push 0x1021b408
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.1000bd10
lea edx, [ebp - 0x20c]
add esp, 0x14
mov ecx, 0x104
sub edx, esi
lea ebx, [ebx]
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [esi + edx]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10164e20
jmp 0x10165064
push 0x14
push str._ProgramFiles_x86___
push esi
call fcn.10213547
add esp, 0xc
test eax, eax
jne 0x10164efb
push 0x206
push eax
lea eax, [ebp - 0x412]
push eax
call fcn.102134e7
add esp, 0xc
xor eax, eax
mov word [ebp - 0x414], ax
push eax
push 0x2a
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x1016506c
lea eax, [esi + 0x28]
push eax
lea eax, [ebp - 0x414]
push eax
push 0x1021b408
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.1000bd10
lea edx, [ebp - 0x20c]
add esp, 0x14
mov ecx, 0x104
sub edx, esi
lea esp, [esp]
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [esi + edx]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10164ed0
jmp 0x10165064
push 0xf
push str._ProgramFiles__
push esi
call fcn.10213547
add esp, 0xc
test eax, eax
jne 0x10164fab
push 0x206
push eax
lea eax, [ebp - 0x412]
push eax
call fcn.102134e7
add esp, 0xc
xor eax, eax
mov word [ebp - 0x414], ax
push eax
push 0x26
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x1016506c
lea eax, [esi + 0x1e]
push eax
lea eax, [ebp - 0x414]
push eax
push 0x1021b408
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.1000bd10
lea edx, [ebp - 0x20c]
add esp, 0x14
mov ecx, 0x104
sub edx, esi
lea esp, [esp]
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [esi + edx]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10164f80
jmp 0x10165064
cmp word [esi], 0x22
jne 0x1016506c
lea ecx, [ebp - 0x20c]
mov eax, esi
mov edi, ecx
mov edx, 0x104
sub eax, edi
lea edi, [eax + 2]
lea esp, [esp]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10164ff7
movzx eax, word [edi + ecx]
test ax, ax
je 0x10164ff0
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x10164fd0
jmp 0x10164ff4
test edx, edx
jne 0x10164ff7
sub ecx, 2
xor eax, eax
mov word [ecx], ax
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10165005
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 - 2]
cmp ecx, 0x208
jae 0x1016507d
xor eax, eax
lea edx, [ebp - 0x20c]
mov word [ebp + ecx - 0x20c], ax
sub edx, esi
mov ecx, 0x104
lea ebx, [ebx]
lea eax, [ecx + 0x7ffffefa]
test eax, eax
je 0x10165067
movzx eax, word [esi + edx]
test ax, ax
je 0x10165060
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x10165040
jmp 0x10165064
test ecx, ecx
jne 0x10165067
sub esi, 2
xor eax, eax
mov word [esi], ax
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret
call fcn.101e2490
int3