Function at 0x40ca5d
Capabilities:
Set registry value

Disassembly:
mov eax, 0x4813a8
call fcn.0040f970
push ecx
mov eax, 0x2118
call fcn.0040f8c0
push ebx
push esi
push edi
lea eax, [ebp - 0x2128]
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ebx, ebx
push eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], ebx
call fcn.0040c097
cmp eax, ebx
jl 0x40cd76
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x2128]
push eax
call fcn.0040cdc1
test eax, eax
pop ecx
pop ecx
jne 0x40cab6
mov eax, 0x80020009
jmp 0x40cd76
mov ecx, esi
call fcn.0040c06e
lea eax, [ebp - 0x2128]
push eax
mov ecx, esi
call fcn.0040c097
cmp eax, ebx
jl 0x40cd76
movzx eax, word [ebp - 0x1c]
sub eax, 8
je 0x40cd42
sub eax, 9
je 0x40cc24
dec eax
dec eax
je 0x40cbdc
sub eax, 0x3ff5
jne 0x40cd65
lea eax, [ebp - 0x2128]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
mov dword [ebp - 0x128], ebx
add eax, eax
cmp eax, 0x100
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
jbe 0x40cb3c
push eax
lea ecx, [ebp - 0x128]
call fcn.0040ce8f
jmp 0x40cb4c
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], eax
jmp 0x40cb4c
mov esi, dword [ebp - 0x128]
cmp esi, ebx
je 0x40cbb3
cmp word [ebp - 0x2128], 0
lea edi, [ebp - 0x2128]
je 0x40cb98
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
push edi
call ebx
mov cx, word [edi]
cmp cx, 0x5c
jne 0x40cb8b
cmp word [eax], 0x30
jne 0x40cb8b
and word [esi], 0
inc esi
push eax
inc esi
call ebx
mov edi, eax
jmp 0x40cb92
mov word [esi], cx
inc esi
inc esi
inc edi
inc edi
cmp word [edi], 0
jne 0x40cb6c
and word [esi], 0
push dword [ebp - 0x128]
mov ecx, dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.0040cd87
mov esi, eax
xor ebx, ebx
jmp 0x40cbb6
push 0xe
pop esi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x124]
cmp dword [ebp - 0x128], eax
je 0x40cd58
lea ecx, [ebp - 0x128]
call fcn.0040ce85
jmp 0x40cd58
call dword [0x4c5080]
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
lea eax, [ebp - 0x2128]
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov eax, dword [ebp - 0x18]
push 4
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp + 8]
push 4
push ebx
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x14]
mov esi, eax
call fcn.0040710b
jmp 0x40cd58
lea eax, [ebp - 0x2128]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test al, 1
mov dword [ebp - 0x18], eax
jne 0x40ccae
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x128], ebx
cmp edi, 0x100
mov dword [ebp - 4], 3
mov byte [ebp - 4], 4
jbe 0x40cc77
push edi
lea ecx, [ebp - 0x128]
call fcn.0040ce8f
jmp 0x40cc8a
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], eax
jmp 0x40cc8a
cmp dword [ebp - 0x128], ebx
mov dword [ebp - 4], 3
jne 0x40ccb8
lea eax, [ebp - 0x124]
test eax, eax
je 0x40ccae
lea ecx, [ebp - 0x128]
call fcn.0040ce85
mov eax, 0x80004005
jmp 0x40cd76
push edi
push ebx
push dword [ebp - 0x128]
call sub.MSVCR71.dll_memset
add esp, 0xc
cmp dword [ebp - 0x18], ebx
jle 0x40cd08
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
xor eax, eax
mov ax, word [ebp + ebx*2 - 0x2128]
sar esi, 1
add esi, dword [ebp - 0x128]
push eax
call fcn.0040ce53
pop ecx
mov ecx, ebx
and ecx, 1
shl ecx, 2
mov edx, ecx
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [esi], al
inc ebx
cmp ebx, dword [ebp - 0x18]
jl 0x40cccd
xor ebx, ebx
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push edi
push dword [ebp - 0x128]
push 3
push ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
or dword [ebp - 4], 0xffffffff
mov esi, eax
lea eax, [ebp - 0x124]
cmp dword [ebp - 0x128], eax
je 0x40cd58
lea ecx, [ebp - 0x128]
call fcn.0040ce85
jmp 0x40cd58
mov ecx, dword [ebp + 8]
push 1
lea eax, [ebp - 0x2128]
push eax
push dword [ebp + 0xc]
call fcn.00406881
mov esi, eax
cmp esi, ebx
je 0x40cd65
push esi
call fcn.004066fc
pop ecx
jmp 0x40cd76
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0x24]
call fcn.0040c097
cmp eax, ebx
jl 0x40cd76
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc