Function at 0x40d890
Capabilities:
Encode data using xor
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x3b8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x3c8]
push edi
mov dword [esp + 0x18], 1
mov eax, dword [esi + 0xc]
mov dword [esp + 0x10], str.regsvr32__s
test ah, 0x20
je 0x40d911
cmp word [esi + 4], 0x1f4
jne 0x40d8d7
mov eax, dword [esi + 0x24]
test eax, eax
je 0x40d8cd
cmp byte [eax], 0
jne 0x40d8dc
mov eax, dword [0x42a9b0]
cmp byte [eax], 0
jne 0x40d8dc
mov eax, dword [0x42a9b4]
push eax
lea eax, [esp + 0x5c]
push str._s___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x64]
push 1
push ecx
push str.regedit
call fcn.00402c40
add esp, 0x18
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3b8
ret
test ah, 0x40
mov ebx, 0x1f4
je 0x40da14
push str.oleaut32.dll
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40d9cc
push str.LoadTypeLibEx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40d9aa
mov eax, dword [esp + 0x3cc]
cmp word [eax + 4], bx
jne 0x40d96b
mov eax, dword [eax + 0x24]
test eax, eax
je 0x40d961
cmp byte [eax], 0
jne 0x40d970
mov eax, dword [0x42a9b0]
cmp byte [eax], 0
jne 0x40d970
mov eax, dword [0x42a9b4]
push 0x104
lea edx, [esp + 0x1c4]
push eax
push edx
call fcn.0041b30a
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c0]
push eax
push 1
push ecx
call esi
test eax, eax
jl 0x40d9aa
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov ebp, 1
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebp, ebp
je 0x40d9c5
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3b8
ret
mov esi, dword [esp + 0x3cc]
cmp word [esi + 4], bx
je 0x40da0c
mov eax, dword [0x42a9b4]
lea ecx, [esp + 0x58]
push eax
push str._q___s_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x64]
push 1
push edx
push str.regtlib
call fcn.00402c40
add esp, 0x18
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3b8
ret
mov dword [esp + 0x10], str.regtlib__q
mov ax, word [esi + 4]
cmp ax, bx
jne 0x40dbd7
mov edi, 0x4252d4
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
xor esi, esi
cmp ecx, ebx
mov dl, 0xa5
lea ebp, [esp + 0x1c0]
jle 0x40da5d
mov al, dl
shl al, 7
shr dl, 1
add dl, al
mov al, byte [esi + 0x4252d4]
xor al, dl
mov byte [ebp], al
inc ebp
inc esi
cmp esi, ecx
jl 0x40da43
lea ecx, [esp + 0x14]
push ebx
push ecx
push ebx
push 0xf003f
push ebx
push ebx
lea edx, [esp + 0x1d8]
push ebx
push edx
push 0x80000002
mov byte [ebp], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40dab4
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c0]
push eax
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40dab4
pop edi
pop esi
mov dword [esp + 0x10], ebx
mov eax, ebx
pop ebp
pop ebx
add esp, 0x3b8
ret
mov eax, dword [0x42a99c]
cmp eax, 0x64
jge 0x40dbbd
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebp, 0x168
push eax
push str.ICLaunch
lea edx, [esp + 0x2c]
push str._s_3.3d
push edx
call esi
mov edx, dword [0x42a99c]
add esp, 0x10
inc edx
lea eax, [esp + 0x1c]
mov dword [0x42a99c], edx
lea ecx, [esp + 0x58]
push eax
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push ebx
push eax
push ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebp
call edi
test eax, eax
jne 0x40db41
mov eax, dword [0x42a99c]
cmp eax, 0x64
jl 0x40dad3
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3b8
ret
mov edx, dword [0x42a9b4]
mov eax, dword [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x60]
push 0x425d4c
push ecx
call esi
lea edi, [esp + 0x68]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x58]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push 1
lea eax, [esp + 0x30]
push ebx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40dbb9
mov edx, dword [esp + 0x3cc]
mov eax, dword [edx + 0xc]
test ah, 0x60
jne 0x40dbbd
push ebx
call fcn.0040d5b0
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3b8
ret
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3b8
ret
cmp ax, 0x17
je 0x40dbe3
cmp ax, 0x19
jne 0x40dbed
push 1
call fcn.0040d5b0
add esp, 4
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3b8
ret