Function at 0x40b380
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4530e2
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x46b554]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push ebx
push ebx
push 0x4091a0
push ebx
push ebx
mov esi, 5
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00409b00
test al, al
jne 0x40b3da
push 0x7d0
call edi
dec esi
cmp esi, ebx
jg 0x40b3c5
cmp esi, ebx
je 0x40b5b7
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
xor esi, esi
mov edi, edi
push ebx
push ebx
push 1
push ebx
call edi
mov dword [ebp + esi*4 - 0x60], eax
inc esi
cmp esi, 6
jl 0x40b410
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
lea eax, [ebp - 0x48]
push eax
push str.SoftwareResearch_In_MotionRIMBBLaunchAgentConfigAdd
push SysStringLen
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
lea ecx, [ebp - 0x44]
push ecx
push str.SoftwareResearch_In_MotionRIMBBLaunchAgentConfigAdd
push 0x80000001
call edi
lea edx, [ebp - 0x40]
push edx
push str.SoftwareResearch_In_MotionRIMBBLaunchAgentConfigRemove
push SysStringLen
call esi
lea eax, [ebp - 0x3c]
push eax
push str.SoftwareResearch_In_MotionRIMBBLaunchAgentConfigRemove
push 0x80000001
call edi
lea ecx, [ebp - 0x38]
push ecx
push str.SoftwareResearch_In_MotionRIMBBLaunchAgentRegs
push SysStringLen
call esi
lea edx, [ebp - 0x34]
push edx
push str.SoftwareResearch_In_MotionRIMBBLaunchAgentRegs
push 0x80000001
call edi
xor esi, esi
nop
mov eax, dword [ebp + esi - 0x48]
cmp eax, ebx
je 0x40b4a9
mov ecx, dword [ebp + esi - 0x60]
push 1
push ecx
push 5
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegNotifyChangeKeyValue]
add esi, 4
cmp esi, 0x18
jl 0x40b490
push 0xffffffffffffffff
push ebx
lea edx, [ebp - 0x60]
push edx
push 6
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov esi, eax
cmp esi, 6
jae 0x40b5a3
push str.Registry_changed__rescan
call fcn.0040ba70
mov eax, dword [ebp + esi*4 - 0x60]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [ebp + esi*4 - 0x60]
mov edx, dword [ebp + esi*4 - 0x48]
push 1
push ecx
push 4
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegNotifyChangeKeyValue]
push 0x2c
mov dword [ebp - 0x28], ebx
call fcn.0042fcc4
add esp, 4
cmp eax, ebx
je 0x40b57f
mov dword [ebp - 0x2c], eax
mov dword [eax], eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x28], 1
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x29], 1
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], ebx
call fcn.00409bf0
test al, al
je 0x40b54e
lea edx, [ebp - 0x30]
push edx
call fcn.00403660
mov eax, dword [0x46d774]
push eax
call fcn.0040a3c0
add esp, 4
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [ebp - 0x14]
lea esi, [ebp - 0x30]
call fcn.00408d10
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0042f9a7
add esp, 4
jmp 0x40b4b1
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x10], ebx
call fcn.0042fddd
push 0x46809c
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x20], vtable.std::bad_alloc.0
call fcn.00437405
push str.Wait_Failed
call fcn.0040ba70
add esp, 4
push 1
call fcn.0043182a
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret