Function at 0x409a40
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x2108]
mov eax, 0x2108
call fcn.0041eb90
push 0xffffffffffffffff
push 0x420cb8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x4300b8]
xor eax, ebp
mov dword [ebp + 0x2104], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, edx
mov dword [ebp - 0x24], esi
mov edi, dword [ebp + 0x2110]
mov dword [ebp - 0x18], edi
mov eax, dword [ebp + 0x2114]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x14], 0
lea eax, [ebp + 0x104]
mov ecx, esi
call fcn.0040a110
test eax, eax
jl 0x409de6
lea edx, [ebp - 0x14]
push edx
lea ebx, [ebp + 0x104]
call fcn.00409860
add esp, 4
test eax, eax
jne 0x409ad6
mov eax, 0x80020009
jmp 0x409de6
call fcn.0040aa20
lea eax, [ebp + 0x104]
mov ecx, esi
call fcn.0040a110
xor esi, esi
cmp eax, esi
jl 0x409de6
movzx eax, word [ebp - 0x14]
cmp eax, 0x13
jg 0x409cc2
je 0x409c73
cmp eax, 8
je 0x409c43
cmp eax, 0x11
jne 0x409dd1
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
mov dword [ebp - 0x14], ebx
test bl, 1
jne 0x409bb9
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x20], edi
xor ecx, ecx
mov dword [ebp], ecx
mov esi, 4
mov dword [ebp - 4], esi
mov byte [ebp - 4], 5
mov eax, edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ecx
cmp ecx, ecx
ja 0x409b5e
cmp eax, 0xffffffff
jbe 0x409b68
push 0x80070057
call fcn.004177e0
cmp eax, 0x100
jbe 0x409b7d
lea ecx, [ebp]
push ecx
call fcn.00409950
mov dword [ebp - 4], esi
jmp 0x409b9b
lea edx, [ebp + 4]
mov dword [ebp], edx
mov dword [ebp - 4], esi
jmp 0x409b9b
mov eax, dword [ebp]
test eax, eax
jne 0x409bc3
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x409bb9
lea eax, [ebp]
call fcn.004092d0
mov eax, 0x80004005
jmp 0x409de6
push edi
push 0
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
xor esi, esi
test ebx, ebx
jle 0x409c08
mov ecx, esi
shr ecx, 1
mov edx, dword [ebp]
lea ebx, [ecx + edx]
mov cx, word [ebp + esi*2 + 0x104]
call fcn.004099d0
mov ecx, esi
and ecx, 1
add ecx, ecx
add ecx, ecx
mov edx, ecx
mov ecx, 4
sub ecx, edx
shl al, cl
or byte [ebx], al
inc esi
cmp esi, dword [ebp - 0x14]
jl 0x409bd5
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
push edi
mov ecx, dword [ebp]
push ecx
push 3
push 0
mov edx, dword [ebp - 0x1c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x409dc2
lea eax, [ebp]
call fcn.004092d0
jmp 0x409dc2
lea ecx, [ebp + 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp + 0x104]
push eax
push 1
push esi
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [edi]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
jmp 0x409dc2
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 3
lea eax, [ebp - 0x20]
push eax
push esi
push esi
lea ecx, [ebp + 0x104]
push ecx
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x14], edx
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push esi
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [edi]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x18]
call fcn.0040b3f0
jmp 0x409dc2
cmp eax, 0x4008
jne 0x409dd1
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 2
mov dword [ebp], esi
mov dword [ebp - 4], esi
mov byte [ebp - 4], 1
mov ecx, 2
mul ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
cmp edx, esi
ja 0x409cfd
cmp eax, 0xffffffff
jbe 0x409d07
push 0x80070057
call fcn.004177e0
cmp eax, 0x100
jbe 0x409d1c
lea edx, [ebp]
push edx
call fcn.00409950
mov dword [ebp - 4], esi
jmp 0x409d37
lea eax, [ebp + 4]
mov dword [ebp], eax
mov dword [ebp - 4], esi
jmp 0x409d37
mov esi, dword [ebp]
test esi, esi
je 0x409da6
lea ebx, [ebp + 0x104]
cmp word [ebp + 0x104], 0
je 0x409d87
mov edi, dword [sym.imp.USER32.dll_CharNextW]
push ebx
call edi
movzx ecx, word [ebx]
cmp cx, 0x5c
jne 0x409d75
cmp word [eax], 0x30
jne 0x409d75
xor ecx, ecx
mov word [esi], cx
add esi, 2
push eax
call edi
mov ebx, eax
jmp 0x409d7e
mov word [esi], cx
add esi, 2
add ebx, 2
cmp word [ebx], 0
jne 0x409d54
mov edi, dword [ebp - 0x18]
xor edx, edx
mov word [esi], dx
add esi, 2
xor eax, eax
mov word [esi], ax
mov ecx, dword [ebp]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push edi
call fcn.00409980
mov ebx, eax
jmp 0x409dab
mov ebx, 0xe
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x409dc2
lea eax, [ebp]
call fcn.004092d0
xor esi, esi
cmp ebx, esi
je 0x409dd1
mov eax, ebx
call fcn.0040a0d0
jmp 0x409de6
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
call fcn.0040a110
xor ecx, ecx
cmp eax, esi
setge cl
dec ecx
and eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2104]
xor ecx, ebp
call fcn.0041e4d2
add ebp, 0x2108
mov esp, ebp
pop ebp
ret 8