Function at 0x40d340
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x4cc99c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
push 0x206
xor ebx, ebx
lea ecx, [ebp - 0x20a]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x20c], ax
call sub.MSVCR100.dll_memset
add esp, 0xc
mov dword [ebp - 0x210], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x214], ebx
call fcn.0040d1a0
lea edx, [ebp - 0x210]
push edx
push 0x20019
push ebx
mov ecx, esi
call fcn.00402630
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [esi + 0x54], eax
mov ecx, esi
cmp eax, ebx
je 0x40d5da
push ebx
lea eax, [ebp - 0x210]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
call fcn.00402630
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [esi + 0x54], eax
cmp eax, ebx
jne 0x40d582
mov ecx, esi
call fcn.00402630
push eax
push str.URL:_s_Protocol
lea ecx, [ebp - 0x20c]
push 0x104
push ecx
call dword [sym.imp.MSVCR100.dll_swprintf_s]
lea eax, [ebp - 0x20c]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d411
mov ecx, dword [ebp - 0x210]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp - 0x20c]
push eax
push 1
push ebx
push 0x4ab248
push ecx
call edi
mov dword [esi + 0x54], eax
cmp eax, ebx
jne 0x40d582
mov edx, dword [ebp - 0x210]
push ebx
push 0x4ab7d8
push 1
push ebx
push str.URL_Protocol
push edx
call edi
mov dword [esi + 0x54], eax
cmp eax, ebx
jne 0x40d582
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x218]
push eax
push str.DefaultIcon
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov dword [esi + 0x54], eax
cmp eax, ebx
jne 0x40d582
cmp dword [esi + 0x4c], 8
jb 0x40d49f
mov eax, dword [esi + 0x38]
jmp 0x40d4a2
lea eax, [esi + 0x38]
push eax
push 0x4ab4fc
lea edx, [ebp - 0x20c]
push 0x104
push edx
call dword [sym.imp.MSVCR100.dll_swprintf_s]
lea eax, [ebp - 0x20c]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d4c6
sub eax, edx
mov edx, dword [ebp - 0x218]
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea ecx, [ebp - 0x20c]
push ecx
push 1
push 0
push 0x4ab248
push edx
call edi
mov dword [esi + 0x54], eax
test eax, eax
jne 0x40d580
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x214]
push eax
push str.ShellOpencommand
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov dword [esi + 0x54], eax
test eax, eax
jne 0x40d580
cmp dword [esi + 0x4c], 8
jb 0x40d529
mov eax, dword [esi + 0x38]
jmp 0x40d52c
lea eax, [esi + 0x38]
push eax
push str.__s_____1_
lea edx, [ebp - 0x20c]
push 0x104
push edx
call dword [sym.imp.MSVCR100.dll_swprintf_s]
lea eax, [ebp - 0x20c]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d550
sub eax, edx
mov edx, dword [ebp - 0x214]
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea ecx, [ebp - 0x20c]
push ecx
push 1
push 0
push 0x4ab248
push edx
call edi
mov dword [esi + 0x54], eax
xor ebx, ebx
cmp dword [esi + 0x54], ebx
je 0x40d58e
mov eax, esi
call fcn.0040d100
mov eax, dword [ebp - 0x214]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
je 0x40d5a7
push eax
call edi
mov dword [ebp - 0x214], ebx
mov eax, dword [ebp - 0x218]
cmp eax, ebx
je 0x40d5ba
push eax
call edi
mov dword [ebp - 0x218], ebx
mov eax, dword [ebp - 0x210]
cmp eax, ebx
je 0x40d5c7
push eax
call edi
mov ecx, dword [ebp - 4]
mov eax, dword [esi + 0x54]
pop edi
xor ecx, ebp
pop ebx
call fcn.00497792
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x54], 0xffffffff
call fcn.00402630
push eax
push str._s_Key_is_already_present.
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll_swprintf_s]
lea eax, [ebp - 0x20c]
add esp, 0x10
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d610
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea ecx, [esi + 0x58]
call fcn.004027c0
jmp 0x40d582