Function at 0x4109ce
Capabilities:
Accept command line arguments
Check if file exists
Create thread
Get common file path
Query or enumerate registry value
Resume thread

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1d88
call fcn.0041f6b0
and dword [ebp - 0x18], 0
push ebx
push esi
push edi
mov esi, ecx
call section..text
mov dword [esi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test eax, eax
mov dword [ebp - 0x14], eax
mov ebx, 0x81
je 0x410b5e
and word [ebp - 0x320], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x31e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x320]
push 0x103
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
and word [ebp - 0x98], 0
push 0x1f
mov dword [ebp - 8], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x96]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x98]
push 0x3f
push eax
push 0x429590
push edi
call fcn.00402ad1
add esp, 0x10
test eax, eax
je 0x410a7b
cmp word [ebp - 0x98], 0
jne 0x410a9c
lea eax, [ebp - 0x98]
push 0x3f
push eax
mov ecx, esi
push dword [ebp - 8]
call fcn.004126c6
test eax, eax
je 0x410abb
cmp word [ebp - 0x98], 0
je 0x410abb
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x98]
push eax
lea ecx, [esi + 0x38]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0x429584
push edi
call fcn.00402b7f
add esp, 0xc
test eax, eax
jne 0x410ae9
lea eax, [ebp - 4]
mov ecx, esi
push eax
push 1
push dword [ebp - 8]
call fcn.0041281d
test eax, eax
je 0x410af4
xor eax, eax
cmp dword [ebp - 4], eax
setne al
mov dword [esi + 0x24], eax
lea eax, [ebp - 4]
push eax
push 0x429578
push edi
call fcn.00402b7f
add esp, 0xc
test eax, eax
jne 0x410b1e
lea eax, [ebp - 4]
mov ecx, esi
push eax
push 2
push dword [ebp - 8]
call fcn.0041281d
test eax, eax
je 0x410b29
xor eax, eax
cmp dword [ebp - 4], eax
setne al
mov dword [esi + 0x28], eax
lea eax, [ebp - 4]
push eax
push 0x42956c
push edi
call fcn.00402b7f
add esp, 0xc
test eax, eax
jne 0x410b53
lea eax, [ebp - 4]
mov ecx, esi
push eax
push 3
push dword [ebp - 8]
call fcn.0041281d
test eax, eax
je 0x410b5e
xor eax, eax
cmp dword [ebp - 4], eax
setne al
mov dword [esi + 0x2c], eax
and word [ebp - 0x118], 0
push 0x1f
pop ecx
xor eax, eax
lea edi, [ebp - 0x116]
and word [ebp - 0x1978], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x1976]
push 0x103
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x1978]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x118]
push 0x40
push eax
lea eax, [ebp - 0x1978]
push eax
call fcn.00401120
add esp, 0xc
test eax, eax
je 0x4111a8
lea eax, [ebp - 0x118]
lea edi, [esi + 0x48]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x118]
push eax
mov ecx, edi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x936]
mov word [ebp - 0x938], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x938]
push 2
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4111a8
lea eax, [ebp - 0x938]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x938]
push eax
lea ecx, [esi + 0xf8]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
and word [ebp - 0x1770], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x176e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x938]
push 0x429554
push eax
lea eax, [ebp - 0x1770]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x1770]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x1770]
push eax
lea ecx, [esi + 0x108]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x72e]
mov word [ebp - 0x730], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x730]
push 0x17
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4111a8
lea eax, [ebp - 0x730]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x730]
push eax
lea ecx, [esi + 0x138]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
and word [ebp - 0x1158], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x1156]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x730]
push 0x429554
push eax
lea eax, [ebp - 0x1158]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x1158]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x1158]
push eax
lea ecx, [esi + 0x148]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0xf4e]
mov word [ebp - 0xf50], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xf50]
push 0xb
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4111a8
lea eax, [ebp - 0xf50]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0xf50]
push eax
lea ecx, [esi + 0x118]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x1566]
mov word [ebp - 0x1568], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x1568]
push 0x16
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4111a8
lea eax, [ebp - 0x1568]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x1568]
push eax
lea ecx, [esi + 0x158]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x135e]
mov word [ebp - 0x1360], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x1360]
push 0x10
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4111a8
lea eax, [ebp - 0x1360]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x1360]
push eax
lea ecx, [esi + 0x128]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0xb3e]
mov word [ebp - 0xb40], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xb40]
push 0x19
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4111a8
lea eax, [ebp - 0xb40]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0xb40]
push eax
lea ecx, [esi + 0x168]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x1b7e]
mov word [ebp - 0x1b80], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x1b80]
push 0x1a
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4111a8
and word [ebp - 0xd48], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0xd46]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x1b80]
push 0x429500
push eax
lea eax, [ebp - 0xd48]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0xd48]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0xd48]
push eax
lea ecx, [esi + 0xe8]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
and word [ebp - 0x528], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x526]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xc]
mov edi, 0x427670
push eax
lea eax, [ebp - 0x528]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x42920c
push edi
push SysReAllocString
mov dword [ebp - 0x10], 1
mov dword [ebp - 0xc], 0x206
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x410f4d
lea eax, [ebp - 0x528]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x410f97
cmp dword [esi + 0x14], 8
jge 0x410f97
push 0x208
lea eax, [ebp - 0x528]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], 1
mov dword [ebp - 0xc], 0x206
push eax
lea eax, [ebp - 0x528]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x42920c
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
lea eax, [ebp - 0x528]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41105f
and word [ebp - 0x320], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x31e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x528]
push 0x427eb8
push eax
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
and word [ebp - 0x98], 0
push 0x1f
pop ecx
xor eax, eax
lea edi, [ebp - 0x96]
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x320]
push eax
call fcn.00401120
xor edi, edi
add esp, 0xc
cmp word [ebp - 0x98], di
je 0x41103f
mov eax, dword [esi + 0x4c]
cmp eax, edi
jne 0x411021
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.00401202
pop ecx
cmp eax, edi
pop ecx
jge 0x41103d
mov dword [esi + 0x18], 1
jmp 0x41104f
jne 0x411048
mov dword [esi + 0x18], 2
jmp 0x41104f
mov dword [esi + 0x18], 3
lea eax, [ebp - 0x528]
mov ecx, esi
push eax
call fcn.004123ed
jmp 0x4110d3
and word [ebp - 0x320], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x31e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x14]
mov dword [ebp - 8], 1
push eax
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 8]
push eax
push 0x4294e4
push 0x42799c
push SysReAllocString
mov dword [ebp - 0x14], 0x206
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x4110d1
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4110d1
lea eax, [ebp - 0x320]
mov ecx, esi
push eax
mov dword [esi + 0x18], 4
call fcn.004123ed
xor edi, edi
cmp dword [esi + 0x80], edi
jne 0x41114f
mov dword [esi + 0x18], edi
mov word [ebp - 0x320], di
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x31e]
cmp dword [esi + 0x14], 8
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
jge 0x4110ff
push 0x26
jmp 0x411101
push 0x1a
lea eax, [ebp - 0x320]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
and word [ebp - 0x1d88], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x1d86]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x320]
push 0x4280f4
push eax
lea eax, [ebp - 0x1d88]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x1d88]
mov ecx, esi
push eax
call fcn.004123ed
xor edi, edi
lea eax, [esi + 4]
push eax
push 4
push esi
push 0x4111b0
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [ebp - 8], eax
je 0x4111a8
push edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push dword [ebp - 8]
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x3e8
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esi + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 8]
mov dword [esi + 0xc], edi
call ebx
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
leave
ret