Function at 0x10031810
Capabilities:
Accept command line arguments
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1009ab21
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1924
call fcn.100974c0
mov eax, dword [0x100e6018]
xor eax, esp
mov dword [esp + 0x1920], eax
push ebx
push esi
push edi
mov eax, dword [0x100e6018]
xor eax, esp
push eax
lea eax, [esp + 0x1938]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esp + 0x1c], eax
xor eax, eax
push 0x400
push eax
mov word [esp + 0x914], ax
lea eax, [esp + 0x916]
xor edi, edi
push eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [esp + 0x90c]
push 0x200
push eax
push edi
push esi
mov dword [esp + 0xe4], edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x10032082
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
nop
cmp dword [ebx], 0
jne 0x1003207c
lea eax, [esp + 0x50]
push eax
push 0xf003f
push 0
lea eax, [esp + 0x918]
push eax
push dword [esp + 0x24]
mov dword [esp + 0x64], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10032053
push 0x400
push eax
mov word [esp + 0x104], ax
lea eax, [esp + 0x106]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
xor eax, eax
push 0x400
push eax
mov word [esp + 0xd1c], ax
lea eax, [esp + 0xd1e]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
xor eax, eax
push 0x400
push eax
mov word [esp + 0x1124], ax
lea eax, [esp + 0x1126]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0xd18]
push eax
push 0
push 0
push 0x100b2f88
push dword [esp + 0x64]
mov dword [esp + 0x10c], 0
mov dword [esp + 0x110], 0
mov dword [esp + 0xec], 0x200
call esi
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0x1120]
push eax
push 0
push 0
push str.DisplayIcon
push dword [esp + 0x64]
mov dword [esp + 0xec], 0x200
call esi
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0x100]
push eax
push 0
push 0
push str.UninstallString
push dword [esp + 0x64]
mov dword [esp + 0xec], 0x200
call esi
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0xfc]
push eax
push 0
push 0
push str.SystemComponent
push dword [esp + 0x64]
mov dword [esp + 0xec], 4
call esi
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0xf8]
push eax
push 0
push 0
push str.WindowsInstaller
push dword [esp + 0x64]
mov dword [esp + 0xec], 4
call esi
cmp word [esp + 0xd14], 0
je 0x10032049
cmp word [esp + 0xfc], 0
je 0x10032049
cmp dword [esp + 0xf8], 0
jne 0x10032049
push 0
push 0
push 0
push 0
push str.ParentKeyName
push dword [esp + 0x64]
call esi
cmp eax, 2
jne 0x10032049
lea ecx, [esp + 0x54]
call fcn.100320b0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x1940], 0
mov eax, dword [ecx + 0x60]
mov dword [esp + 0xb4], eax
mov eax, dword [ecx + 0x64]
lea edx, [ecx + 0x48]
push 0x100a21f4
lea ecx, [esp + 0x3c]
mov dword [esp + 0xbc], eax
call fcn.10011cb0
add esp, 4
lea ecx, [esp + 0x90c]
push ecx
mov edx, eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x1944], 1
call fcn.10011da0
mov esi, eax
lea eax, [esp + 0xa0]
add esp, 4
cmp eax, esi
je 0x10031b37
cmp dword [esp + 0xb0], 8
jb 0x10031b0a
push dword [esp + 0x9c]
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
push esi
lea ecx, [esp + 0xa0]
mov dword [esp + 0xb4], 7
mov dword [esp + 0xb0], 0
mov word [esp + 0xa0], ax
call fcn.1000d5d0
cmp dword [esp + 0x34], 8
mov esi, dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
jb 0x10031b4d
push dword [esp + 0x20]
call esi
add esp, 4
xor eax, eax
mov byte [esp + 0x1940], al
cmp dword [esp + 0x4c], 8
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], 0
mov word [esp + 0x20], ax
jb 0x10031b7b
push dword [esp + 0x38]
call esi
add esp, 4
cmp word [esp + 0xfc], 0
jne 0x10031b8a
xor eax, eax
jmp 0x10031ba3
lea eax, [esp + 0xfc]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10031b94
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x100]
push eax
lea ecx, [esp + 0x8c]
call fcn.100089b0
cmp word [esp + 0xd14], 0
jne 0x10031bc7
xor ecx, ecx
jmp 0x10031be0
lea ecx, [esp + 0xd14]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031bd1
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0xd18]
push eax
lea ecx, [esp + 0x5c]
call fcn.100089b0
push 0x100b2814
lea ecx, [esp + 0xe0]
call fcn.10008550
xor eax, eax
push 0x400
mov byte [esp + 0x1944], 2
push eax
mov word [esp + 0x50c], ax
lea eax, [esp + 0x50e]
push eax
call sub.MSVCR110.dll_memset
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add esp, 0xc
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0x508]
push eax
push 0
push 0
push str.InstallLocation
push dword [esp + 0x64]
mov dword [esp + 0xec], 0x200
call esi
test eax, eax
jne 0x10031c82
cmp word [esp + 0x504], ax
je 0x10031c82
lea eax, [esp + 0x504]
push eax
lea ecx, [esp + 0xe0]
call fcn.100085e0
jmp 0x10031d30
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0x508]
push eax
push 0
push 0
push str.LocationRoot
push dword [esp + 0x64]
mov dword [esp + 0xec], 0x200
call esi
test eax, eax
jne 0x10031cd0
cmp word [esp + 0x504], ax
je 0x10031cd0
lea eax, [esp + 0x504]
push eax
lea ecx, [esp + 0xe0]
call fcn.100085e0
jmp 0x10031d30
cmp dword [esp + 0xf4], 0
je 0x10031d30
push 0x20
call dword [sym.imp.MSVCR110.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
add esp, 4
test esi, esi
je 0x10031d01
xor eax, eax
mov dword [esi + 0x1c], 7
mov dword [esi + 0x18], 0
mov word [esi + 8], ax
jmp 0x10031d03
xor esi, esi
lea eax, [esp + 0xdc]
push eax
sub esp, 0x18
lea eax, [esp + 0x928]
mov ecx, esp
push eax
call fcn.10008550
mov ecx, esi
call sym.iImportLib.dll_public:_long_int___thiscall_elex::msi::CMsiHelper::InstalledMsiGetSetupPath_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____
test esi, esi
je 0x10031d30
push ecx
mov ecx, esi
call fcn.10032100
cmp dword [esp + 0xec], 0
jne 0x10031dfd
mov esi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push 0x100b5668
lea eax, [esp + 0x100]
push eax
call esi
test eax, eax
je 0x10031da3
lea eax, [esp + 0xd8]
push eax
lea eax, [esp + 0x100]
push eax
mov dword [esp + 0xe0], 0
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp word [esp + 0xfc], 0x22
mov esi, eax
jne 0x10031dd6
push dword [esi]
call edi
push dword [esi]
lea ecx, [esp + 0xe0]
call fcn.100085e0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x10031e3c
push 0x100b5668
lea eax, [esp + 0x1120]
push eax
call esi
test eax, eax
je 0x10031d57
lea eax, [esp + 0x111c]
push eax
call edi
lea eax, [esp + 0x111c]
push eax
lea ecx, [esp + 0xe0]
call fcn.100085e0
jmp 0x10031e3c
lea eax, [esp + 0xfc]
push eax
call edi
lea eax, [esp + 0xfc]
push eax
lea ecx, [esp + 0xe0]
call fcn.100085e0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x10031e3c
mov ecx, dword [esp + 0xec]
cmp ecx, 4
jbe 0x10031e3c
mov edx, dword [esp + 0xf0]
mov esi, dword [esp + 0xdc]
cmp edx, 8
lea eax, [esp + 0xdc]
cmovae eax, esi
cmp word [eax + ecx*2 - 8], 0x2e
jne 0x10031e3c
cmp edx, 8
lea eax, [esp + 0xdc]
cmovae eax, esi
push eax
call edi
cmp dword [esp + 0xec], 0
jbe 0x10031ff5
cmp dword [esp + 0xf0], 8
lea edx, [esp + 0xdc]
cmovae edx, dword [esp + 0xdc]
cmp word [edx], 0
jne 0x10031e6b
xor ecx, ecx
jmp 0x10031e7f
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031e70
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x74]
call fcn.100089b0
push 0
push 0x100b2814
lea ecx, [esp + 0xc4]
call fcn.100089b0
cmp dword [esp + 0xf4], 0
je 0x10031f09
xor eax, eax
push 0x400
push eax
mov word [esp + 0x152c], ax
lea eax, [esp + 0x152e]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [esp + 0xd8]
push eax
lea eax, [esp + 0x1528]
push eax
push str.LocalPackage
lea eax, [esp + 0x918]
push eax
mov dword [esp + 0xe8], 0x200
call dword [sym.imp.msi.dll_MsiGetPropertyW]
lea eax, [esp + 0x1524]
push eax
lea ecx, [esp + 0xc0]
call fcn.100085e0
cmp dword [esp + 0xec], 0
jbe 0x10031ff5
sub esp, 0x18
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [esp + 0xa4]
push eax
call fcn.10008c80
mov ecx, ebx
call sym.iImportLib.dll_public:_struct_UninstCacheInfo____thiscall_UninstCache::QueryUninstByCMD_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___
mov esi, eax
test esi, esi
je 0x10031fe1
cmp dword [esp + 0xf0], 8
lea ecx, [esp + 0xdc]
cmovae ecx, dword [esp + 0xdc]
cmp dword [esi + 0x2c], 8
lea eax, [esi + 0x18]
jb 0x10031f72
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x10031fb6
cmp dword [esp + 0xcc], 0
jbe 0x10031fd7
cmp dword [esp + 0xd0], 8
lea ecx, [esp + 0xbc]
cmovae ecx, dword [esp + 0xbc]
cmp dword [esi + 0x7c], 8
lea eax, [esi + 0x68]
jb 0x10031faa
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x10031fd7
sub esp, 0x18
lea eax, [esi + 0x30]
mov ecx, esp
push eax
call sym.iImportLib.dll_public:_void___thiscall_elex::strings::CAnalyzeCmdline::constructor_class_elex::strings::CAnalyzeCmdline_const__
mov ecx, ebx
call sym.iImportLib.dll_public:_bool___thiscall_UninstCache::DeleteUninst_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___
lea eax, [esp + 0x54]
push eax
mov ecx, ebx
call sym.iImportLib.dll_public:_bool___thiscall_UninstCache::InsertUninst_struct_UninstCacheInfo__
push esi
mov ecx, ebx
call sym.iImportLib.dll_public:_void___thiscall_UninstCache::FreeUninstCacheInfo_struct_UninstCacheInfo__
jmp 0x10031ff5
lea eax, [esp + 0x54]
push eax
mov ecx, ebx
call sym.iImportLib.dll_public:_bool___thiscall_UninstCache::InsertUninst_struct_UninstCacheInfo__
mov dword [esp + 0x10], 1
cmp dword [esp + 0xf0], 8
jb 0x1003200f
push dword [esp + 0xdc]
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
lea ecx, [esp + 0x54]
mov dword [esp + 0xf0], 7
mov dword [esp + 0xec], 0
mov word [esp + 0xdc], ax
mov dword [esp + 0x1940], 0xffffffff
call fcn.10031150
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esp + 0x50]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
push 0x200
lea ecx, [esp + 0x910]
inc eax
push ecx
push eax
push dword [esp + 0x20]
mov dword [esp + 0x28], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x100318c0
mov eax, dword [esp + 0x10]
jmp 0x10032084
mov eax, edi
mov ecx, dword [esp + 0x1938]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1920]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 8