Function at 0x4afc30
Capabilities:
Get common file path
Get installed programs
Query environment variable
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x648
test eax, eax
je 0x4b036c
push ebx
push esi
xor ecx, ecx
lea esi, [eax + 0x21c]
lea ebx, [eax + 0x424]
xor edx, edx
push edi
mov dword [ebp - 4], esi
mov word [esi], cx
mov dword [ebp - 8], ebx
mov word [ebx], dx
cmp dword [eax], ecx
jne 0x4b016c
call fcn.004ad0f0
mov edi, eax
push 0x105
lea eax, [ebp - 0x230]
push eax
push str._ConEmuBaseDir__tcc.exe
mov dword [ebp - 0x20], edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4afcc9
cmp eax, 0x105
jae 0x4afcc9
lea ecx, [ebp - 0x230]
push 0
push ecx
call fcn.004acca0
add esp, 8
test eax, eax
je 0x4afcc9
lea edx, [ebp - 0x230]
push edx
push esi
call fcn.0040f0b0
lea eax, [ebp - 0x230]
push eax
push ebx
call fcn.0040f0b0
add esp, 0x10
cmp word [esi], 0
je 0x4afcd9
cmp word [ebx], 0
jne 0x4afeca
xor eax, eax
mov dword [ebp - 0xc], eax
mov edi, edi
test eax, eax
je 0x4afcec
test edi, edi
je 0x4afe96
test eax, eax
mov byte [ebp + 0xb], 0
mov eax, edi
jne 0x4afd01
neg eax
sbb eax, eax
and eax, 0x200
jmp 0x4afd0a
neg eax
sbb eax, eax
and eax, 0x100
mov ebx, eax
lea ecx, [ebp - 0x10]
push ecx
or ebx, 0x20019
push ebx
push 0
push str.SOFTWAREJP_Software
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4afe90
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x24]
push edx
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x648]
push eax
push ecx
push edx
mov dword [ebp - 0x24], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x4afe80
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push eax
push ebx
push 0
lea ecx, [ebp - 0x648]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4afe73
push 0x20a
push eax
lea eax, [ebp - 0x230]
push eax
call fcn.004b03e0
mov eax, dword [ebp - 0x18]
add esp, 0xc
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x230]
push edx
push 0
push 0
push 0
push eax
mov dword [ebp - 0x1c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4afe69
mov ax, word [ebp - 0x230]
test ax, ax
je 0x4afe69
cmp ax, 0x22
jne 0x4afdf7
lea esi, [ebp - 0x22e]
mov ecx, esi
push 0x22
push ecx
call fcn.004b03ac
add esp, 8
test eax, eax
je 0x4afdfd
xor edx, edx
mov word [eax], dx
jmp 0x4afdfd
lea esi, [ebp - 0x230]
push 0x5c
push esi
call fcn.004b135e
mov edi, eax
add esp, 8
test edi, edi
je 0x4afe73
push str._tcmd.exe
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4afe73
push eax
push esi
call fcn.004acca0
add esp, 8
test eax, eax
je 0x4afe73
push 8
push str.tcc.exe
add edi, 2
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0
push esi
call fcn.004acca0
add esp, 8
test eax, eax
je 0x4afe69
cmp dword [ebp - 0xc], 0
mov byte [ebp + 0xb], 1
push esi
jne 0x4afe5d
mov eax, dword [ebp - 4]
push eax
jmp 0x4afe61
mov ecx, dword [ebp - 8]
push ecx
call fcn.0040f0b0
add esp, 8
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x14]
cmp byte [ebp + 0xb], 0
je 0x4afd34
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 4]
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
inc eax
cmp eax, 1
mov dword [ebp - 0xc], eax
jle 0x4afce0
movzx eax, word [esi]
test ax, ax
je 0x4afeb5
cmp word [ebx], 0
jne 0x4afebb
push esi
push ebx
jmp 0x4afec2
cmp word [ebx], 0
je 0x4afeca
test ax, ax
jne 0x4afeca
push ebx
push esi
call fcn.0040f0b0
add esp, 8
cmp word [esi], 0
je 0x4afeda
cmp word [ebx], 0
jne 0x4b00f8
mov ebx, dword [ebp - 4]
xor esi, esi
mov dword [ebp - 0x18], esi
test esi, esi
je 0x4aff11
test edi, edi
je 0x4b00e9
mov ecx, dword [ebp - 8]
movzx eax, word [ecx]
test ax, ax
jne 0x4b00e9
mov byte [ebp + 0xb], al
mov eax, edi
test esi, esi
jne 0x4aff16
neg eax
sbb eax, eax
and eax, 0x200
jmp 0x4aff1f
movzx eax, word [ebx]
jmp 0x4afef4
neg eax
sbb eax, eax
and eax, 0x100
mov ebx, eax
lea edx, [ebp - 0x10]
push edx
or ebx, 0x20019
push ebx
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4b00e6
xor edi, edi
mov edx, dword [ebp - 0x10]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x648]
push ecx
push edi
push edx
mov dword [ebp - 0x1c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x4b00d9
cmp word [ebp - 0x648], 0x7b
jne 0x4b00ce
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0xc]
push eax
push ebx
push 0
lea ecx, [ebp - 0x648]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4b00ce
push 0x20a
push eax
lea eax, [ebp - 0x43c]
push eax
call fcn.004b03e0
mov eax, dword [ebp - 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add esp, 0xc
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x43c]
push edx
push 0
push 0
push str.Publisher
push eax
mov dword [ebp - 0x14], 0x208
call esi
test eax, eax
jne 0x4b00c1
push str.JP_Software
lea ecx, [ebp - 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4b00c1
mov ecx, dword [ebp - 0xc]
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x43c]
push eax
push 0
push 0
push str.InstallLocation
push ecx
mov dword [ebp - 0x14], 0x1f2
call esi
test eax, eax
jne 0x4b00c1
mov ax, word [ebp - 0x43c]
test ax, ax
je 0x4b00c1
cmp ax, 0x22
jne 0x4b005e
lea esi, [ebp - 0x43a]
mov edx, esi
push 0x22
push edx
call fcn.004b03ac
add esp, 8
test eax, eax
je 0x4b0064
xor ecx, ecx
mov word [eax], cx
jmp 0x4b0064
lea esi, [ebp - 0x43c]
cmp word [esi], 0
je 0x4b00c1
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 - 2], 0x5c
lea eax, [esi + eax*2]
je 0x4b0087
mov edx, 0x5c
mov word [eax], dx
add eax, 2
push 8
push str.tcc.exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0
push esi
call fcn.004acca0
add esp, 8
test eax, eax
je 0x4b00c1
cmp dword [ebp - 0x18], 0
mov byte [ebp + 0xb], 1
push esi
jne 0x4b00b5
mov eax, dword [ebp - 4]
push eax
jmp 0x4b00b9
mov ecx, dword [ebp - 8]
push ecx
call fcn.0040f0b0
add esp, 8
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x18]
inc edi
cmp byte [ebp + 0xb], 0
je 0x4aff48
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 4]
inc esi
cmp esi, 1
mov dword [ebp - 0x18], esi
jle 0x4afee2
jmp 0x4b00fb
mov ebx, dword [ebp - 4]
cmp word [ebx], 0
mov esi, dword [ebp - 8]
jne 0x4b0145
cmp word [esi], 0
jne 0x4b0145
push 0
push str.C:Program_FilesJPSoftTCMD13_tcc.exe
call fcn.004acca0
add esp, 8
test eax, eax
je 0x4b0124
push str.C:Program_FilesJPSoftTCMD13_tcc.exe
jmp 0x4b013c
push 0
push str.C:Program_FilesJPSoftTCCLE13_tcc.exe
call fcn.004acca0
add esp, 8
test eax, eax
je 0x4b0145
push str.C:Program_FilesJPSoftTCCLE13_tcc.exe
push ebx
call fcn.0040f0b0
add esp, 8
movzx eax, word [ebx]
test ax, ax
je 0x4b0157
cmp word [esi], 0
jne 0x4b015d
push ebx
push esi
jmp 0x4b0164
cmp word [esi], 0
je 0x4b016c
test ax, ax
jne 0x4b016c
push esi
push ebx
call fcn.0040f0b0
add esp, 8
mov eax, dword [ebp - 4]
cmp word [eax], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ebx, dword [sym.imp.KERNEL32.dll_SearchPathW]
jne 0x4b028c
test eax, eax
je 0x4b028c
xor ecx, ecx
mov edx, eax
mov word [edx], cx
call fcn.004ad0f0
mov esi, eax
mov eax, dword [ebp - 4]
cmp word [eax], 0
jne 0x4b0209
push pe_nt_image_headers32
mov ecx, eax
push ecx
call edi
test eax, eax
jle 0x4b0200
cmp eax, 0xf0
jae 0x4b0200
test esi, esi
je 0x4b01dd
mov edx, dword [ebp - 4]
cmp word [edx + eax*2 - 2], 0x5c
mov eax, str.SysWOW64cmd.exe
je 0x4b01d2
mov eax, 0x4e530c
push eax
push 0x104
mov eax, edx
push eax
jmp 0x4b01fb
mov ecx, dword [ebp - 4]
cmp word [ecx + eax*2 - 2], 0x5c
mov eax, str.System32cmd.exe
je 0x4b01f2
mov eax, 0x4e52c4
push eax
push 0x104
mov edx, ecx
push edx
call fcn.00401880
mov eax, dword [ebp - 4]
cmp word [eax], 0
je 0x4b0228
mov esi, dword [ebp - 4]
push 0
push esi
call fcn.004acca0
add esp, 8
test eax, eax
jne 0x4b0222
xor ecx, ecx
mov word [esi], cx
jmp 0x4b022b
cmp word [esi], 0
jne 0x4b028c
mov esi, dword [ebp - 4]
lea edx, [ebp + 8]
push edx
push esi
push 0x104
push 0
push str.cmd.exe
push 0
call ebx
test eax, eax
je 0x4b024b
cmp eax, 0x104
jb 0x4b028c
mov eax, dword [ebp - 4]
mov esi, str.cmd.exe
mov edx, 0x104
sub esi, eax
lea ebx, [ebx]
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x4b0280
movzx ecx, word [esi + eax]
test cx, cx
je 0x4b0280
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4b0260
jmp 0x4b0284
test edx, edx
jne 0x4b0287
sub eax, 2
xor edx, edx
mov word [eax], dx
mov esi, dword [ebp - 8]
cmp word [esi], 0
jne 0x4b0369
test esi, esi
je 0x4b0369
xor eax, eax
mov word [esi], ax
call fcn.004ad0f0
cmp word [esi], 0
jne 0x4b02e8
push pe_nt_image_headers32
push esi
call edi
test eax, eax
jle 0x4b02e2
cmp eax, 0xf0
jae 0x4b02e2
cmp word [esi + eax*2 - 2], 0x5c
mov eax, str.System32cmd.exe
je 0x4b02d6
mov eax, 0x4e52c4
push eax
push 0x104
push esi
call fcn.00401880
cmp word [esi], 0
je 0x4b0304
push 0
push esi
call fcn.004acca0
add esp, 8
test eax, eax
jne 0x4b02fe
xor ecx, ecx
mov word [esi], cx
jmp 0x4b0304
cmp word [esi], 0
jne 0x4b0369
lea edx, [ebp + 8]
push edx
push esi
push 0x104
push 0
push str.cmd.exe
push 0
call ebx
test eax, eax
je 0x4b0324
cmp eax, 0x104
jb 0x4b0369
mov eax, esi
mov esi, str.cmd.exe
mov edx, 0x104
sub esi, eax
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x4b035d
movzx ecx, word [esi + eax]
test cx, cx
je 0x4b035d
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4b0332
pop edi
sub eax, 2
pop esi
mov word [eax], dx
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jne 0x4b0364
sub eax, 2
xor edx, edx
mov word [eax], dx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret