Function at 0x40c2a0
Capabilities:
Delete registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4529fc
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x46b554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x114], eax
mov eax, dword [ebp + 0x1c]
xor esi, esi
cmp byte [ebp + 8], 0
mov dword [ebp - 0x100], eax
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x118], edx
mov eax, str.SoftwareResearch_In_MotionRIMBBLaunchAgentRegs
jne 0x40c2fe
mov eax, str.SoftwareResearch_In_MotionRIMBBLaunchAgentNRegs
push esi
lea edx, [ebp - 0x110]
push edx
push esi
push 0xf003f
push esi
push esi
push esi
push eax
push ecx
mov byte [ebp - 0x10c], 1
mov dword [ebp - 0xf8], esi
mov dword [ebp - 0x128], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40c334
mov dword [ebp - 0x110], esi
mov eax, dword [ebp - 0xf8]
cmp eax, esi
je 0x40c345
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 4], esi
cmp dword [ebp - 0x110], esi
je 0x40c69f
mov eax, dword [ebp - 0x114]
push eax
lea edx, [ebp - 0x110]
lea ecx, [ebp - 0xf4]
call fcn.0040c0c0
add esp, 4
mov byte [ebp - 4], 1
cmp dword [ebp - 0xe4], 0
je 0x40c3d2
cmp dword [ebp - 0xe0], 8
mov eax, dword [ebp - 0xf4]
jae 0x40c391
lea eax, [ebp - 0xf4]
mov edx, dword [ebp - 0x110]
lea ecx, [ebp - 0xfc]
push ecx
push 0xf003f
push 0
push eax
push edx
mov byte [ebp - 0xf8], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40c3c2
mov dword [ebp - 0xfc], 0
lea esi, [ebp - 0xfc]
call fcn.0040c250
jmp 0x40c485
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, 1
push esi
lea eax, [ebp - 0xd8]
push str.KEY_d
push eax
call edi
mov eax, dword [ebp - 0x110]
add esp, 0xc
lea ecx, [ebp - 0xfc]
push ecx
push 0xf003f
push 0
lea edx, [ebp - 0xd8]
push edx
push eax
mov byte [ebp - 0xf8], 1
call ebx
test eax, eax
je 0x40c428
xor eax, eax
mov dword [ebp - 0xfc], eax
jmp 0x40c42e
mov eax, dword [ebp - 0xfc]
mov byte [ebp - 4], 2
test eax, eax
je 0x40c455
mov byte [ebp - 4], 1
cmp byte [ebp - 0xf8], 0
je 0x40c44a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc esi
cmp esi, 0x3e8
jb 0x40c3e3
jmp 0x40c49f
lea eax, [ebp - 0xd8]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c460
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0xd8]
lea esi, [ebp - 0xf4]
call fcn.004051b0
mov byte [ebp - 4], 1
cmp byte [ebp - 0xf8], 0
je 0x40c49f
mov eax, dword [ebp - 0xfc]
test eax, eax
je 0x40c49f
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x114]
xor ebx, ebx
cmp dword [ebp - 0xe4], ebx
jne 0x40c4bf
push ebx
push esi
or eax, 0xffffffff
lea ecx, [ebp - 0xf4]
call fcn.004049a0
mov eax, dword [ebp - 0xf4]
mov edi, 8
cmp dword [ebp - 0xe0], edi
jae 0x40c4d8
lea eax, [ebp - 0xf4]
mov edx, dword [ebp - 0x110]
push ebx
lea ecx, [ebp - 0x108]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push eax
push edx
mov byte [ebp - 0x104], 1
mov dword [ebp - 0xf8], ebx
mov dword [ebp - 0x128], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40c514
mov dword [ebp - 0x108], ebx
mov eax, dword [ebp - 0xf8]
cmp eax, ebx
je 0x40c525
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x108], ebx
je 0x40c66f
cmp dword [esi + 0x14], edi
jb 0x40c53a
mov edx, dword [esi]
jmp 0x40c53c
mov edx, esi
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40c541
mov ecx, dword [ebp - 0x108]
sub eax, esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push edx
push 1
push ebx
push str.PATH
push ecx
call esi
mov edx, dword [ebp - 0x100]
cmp dword [edx + 0x10], ebx
je 0x40c5af
cmp dword [edx + 0x14], edi
jb 0x40c57f
mov edx, dword [edx]
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40c584
mov ecx, dword [ebp - 0x108]
sub eax, edi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push edx
push 1
push ebx
push str.ARGS
push ecx
call esi
mov edi, 8
mov eax, dword [ebp + 0x18]
cmp eax, 0xffffffff
je 0x40c5db
cmp eax, ebx
je 0x40c5db
push 4
lea edx, [ebp - 0x100]
push edx
push 4
push ebx
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x108]
push str.VENDORID
push eax
call esi
cmp byte [ebp + 0x10], bl
je 0x40c604
mov edx, dword [ebp - 0x108]
push 4
lea ecx, [ebp - 0x100]
push ecx
push 4
push ebx
push str.MULTI
push edx
mov dword [ebp - 0x100], 1
call esi
cmp byte [ebp + 0x14], bl
je 0x40c62d
mov ecx, dword [ebp - 0x108]
push 4
lea eax, [ebp - 0x100]
push eax
push 4
push ebx
push str.ATWAKE
push ecx
mov dword [ebp - 0x100], 1
call esi
mov edx, dword [ebp - 0x118]
cmp dword [edx + 0x10], ebx
je 0x40c66f
cmp dword [edx + 0x14], edi
jb 0x40c63f
mov edx, dword [edx]
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40c644
mov ecx, dword [ebp - 0x108]
sub eax, edi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push edx
push 1
push ebx
push str.PID_MATCH_STR
push ecx
call esi
mov edi, 8
cmp byte [ebp - 0x104], bl
je 0x40c688
mov eax, dword [ebp - 0x108]
cmp eax, ebx
je 0x40c688
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0xe0], edi
jb 0x40c69f
mov edx, dword [ebp - 0xf4]
push edx
call fcn.0042f9a7
add esp, 4
cmp byte [ebp + 8], 0
mov eax, str.SoftwareResearch_In_MotionRIMBBLaunchAgentNRegs
jne 0x40c6af
mov eax, str.SoftwareResearch_In_MotionRIMBBLaunchAgentRegs
mov edx, dword [ebp - 0x124]
xor edi, edi
push edi
lea ecx, [ebp - 0x120]
push ecx
push edi
push 0xf003f
push edi
push edi
push edi
push eax
push edx
mov byte [ebp - 0x11c], 1
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x128], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40c6ed
mov dword [ebp - 0x120], edi
mov eax, dword [ebp - 0x118]
cmp eax, edi
je 0x40c6fe
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x114]
push eax
lea edx, [ebp - 0x120]
lea ecx, [ebp - 0xf4]
mov byte [ebp - 4], 3
call fcn.0040c0c0
add esp, 4
cmp dword [ebp - 0xe4], edi
je 0x40c75d
mov eax, dword [ebp - 0xf4]
mov esi, 8
cmp dword [ebp - 0xe0], esi
jae 0x40c73e
lea eax, [ebp - 0xf4]
mov ecx, dword [ebp - 0x120]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
cmp dword [ebp - 0xe0], esi
jb 0x40c775
mov edx, dword [ebp - 0xf4]
push edx
jmp 0x40c76d
cmp dword [ebp - 0xe0], 8
jb 0x40c775
mov eax, dword [ebp - 0xf4]
push eax
call fcn.0042f9a7
add esp, 4
cmp byte [ebp - 0x11c], 0
je 0x40c78f
mov eax, dword [ebp - 0x120]
cmp eax, edi
je 0x40c78f
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x10c], 0
je 0x40c7a9
mov eax, dword [ebp - 0x110]
cmp eax, edi
je 0x40c7a9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042f9b2
mov esp, ebp
pop ebp
ret