Function at 0x40d5c0
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x2114]
mov eax, 0x2114
call fcn.00460180
push 0xffffffffffffffff
push 0x46d3eb
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x48c74c]
xor eax, ebp
mov dword [ebp + 0x2110], 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, ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
mov ebx, dword [ebp + 0x211c]
mov dword [ebp - 0x14], ebx
mov edi, dword [ebp + 0x2120]
mov dword [ebp - 0x18], edi
mov eax, dword [ebp + 0x2124]
mov dword [ebp - 0x24], eax
mov dword [ebp + 0x10c], 0
lea eax, [ebp + 0x110]
push eax
call fcn.0040dfb0
test eax, eax
js 0x40da04
lea edx, [ebp + 0x10c]
lea ecx, [ebp + 0x110]
call fcn.0040d380
test eax, eax
jne 0x40d660
mov eax, 0x80020009
jmp 0x40da04
mov ecx, esi
call fcn.0040e970
lea eax, [ebp + 0x110]
push eax
mov ecx, esi
call fcn.0040dfb0
test eax, eax
js 0x40da04
movzx eax, word [ebp + 0x10c]
cmp eax, 0x13
jg 0x40d8b4
je 0x40d831
cmp eax, 8
je 0x40d81a
cmp eax, 0x11
jne 0x40d9f1
lea ebx, [ebp + 0x110]
lea ecx, [ebx + 2]
mov edi, edi
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x40d6b0
sub ebx, ecx
sar ebx, 1
mov dword [ebp + 0x108], ebx
test bl, 1
jne 0x40d78d
mov eax, ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp + 0x10c], edi
mov dword [ebp + 0x104], edi
push 0x104
push 0
lea eax, [ebp]
push eax
call fcn.00451fb0
add esp, 0xc
mov dword [ebp], 0
mov dword [ebp - 4], 4
mov byte [ebp - 4], 5
mov dword [ebp - 0x2c], edi
xor eax, eax
mov dword [ebp - 0x28], eax
ja 0x40d740
cmp edi, 0xffffffff
ja 0x40d740
cmp edi, 0x100
jbe 0x40d731
push edi
lea ecx, [ebp]
call fcn.0040ccb0
mov dword [ebp - 4], 4
jmp 0x40d76f
lea eax, [ebp + 4]
mov dword [ebp], eax
mov dword [ebp - 4], 4
jmp 0x40d76f
push 0x80070216
call fcn.0040da30
mov eax, 0x40d750
ret
mov eax, dword [ebp]
test eax, eax
jne 0x40d797
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x40d78d
lea ecx, [ebp]
call fcn.0040cc90
mov eax, 0x80004005
jmp 0x40da04
push edi
push 0
push eax
call fcn.00451fb0
add esp, 0xc
test ebx, ebx
jle 0x40d7e2
xor edi, edi
lea esp, [esp]
mov esi, edi
shr esi, 1
add esi, dword [ebp]
mov cx, word [ebp + edi*2 + 0x110]
call fcn.0040d550
mov edx, edi
and edx, 1
shl edx, 2
mov ecx, 4
sub ecx, edx
shl al, cl
or byte [esi], al
inc edi
cmp edi, ebx
jl 0x40d7b0
mov edi, dword [ebp + 0x10c]
push edi
push dword [ebp]
push 3
push 0
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x40d9e1
lea ecx, [ebp]
call fcn.0040cc90
jmp 0x40d9e1
push ecx
lea eax, [ebp + 0x110]
push eax
push edi
mov ecx, ebx
call fcn.0040d480
mov esi, eax
jmp 0x40d9e1
mov dword [ebp + 0x10c], 0
mov dword [ebp - 4], 3
lea eax, [ebp + 0x104]
push eax
push 0
push 0
lea eax, [ebp + 0x110]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
jns 0x40d879
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10c]
call fcn.0040d530
mov eax, esi
jmp 0x40da04
mov eax, dword [ebp + 0x104]
mov dword [ebp + 0x108], eax
push 4
lea eax, [ebp + 0x108]
push eax
push 4
push 0
push edi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10c]
call fcn.0040d530
jmp 0x40d9e1
cmp eax, 0x4008
jne 0x40d9f1
lea ecx, [ebp + 0x110]
lea edx, [ecx + 2]
jmp 0x40d8d0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d8d0
sub ecx, edx
sar ecx, 1
lea esi, [ecx + 2]
push 0x104
push 0
lea eax, [ebp]
push eax
call fcn.00451fb0
add esp, 0xc
mov dword [ebp], 0
mov dword [ebp - 4], 0
mov byte [ebp - 4], 1
xor eax, eax
shld eax, esi, 1
add esi, esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x40d740
cmp esi, 0xffffffff
ja 0x40d740
cmp esi, 0x100
jbe 0x40d940
push esi
lea ecx, [ebp]
call fcn.0040ccb0
mov dword [ebp - 4], 0
jmp 0x40d962
lea eax, [ebp + 4]
mov dword [ebp], eax
mov dword [ebp - 4], 0
jmp 0x40d962
mov esi, dword [ebp]
test esi, esi
je 0x40d9c5
lea edi, [ebp + 0x110]
cmp word [ebp + 0x110], 0
je 0x40d9af
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
nop
push edi
call ebx
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x40d9a0
cmp word [eax], 0x30
jne 0x40d9a0
xor ecx, ecx
mov word [esi], cx
add esi, 2
push eax
call ebx
mov edi, eax
jmp 0x40d9a9
mov word [esi], cx
add esi, 2
add edi, 2
cmp word [edi], 0
jne 0x40d980
xor eax, eax
mov dword [esi], eax
push dword [ebp]
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
call fcn.0040d4d0
mov esi, eax
jmp 0x40d9ca
mov esi, 0xe
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x40d9e1
lea ecx, [ebp]
call fcn.0040cc90
test esi, esi
je 0x40d9ee
mov ecx, esi
call fcn.0040dfa0
jmp 0x40da04
mov esi, dword [ebp - 0x1c]
push dword [ebp - 0x24]
mov ecx, esi
call fcn.0040dfb0
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2110]
xor ecx, ebp
call fcn.0044bab1
lea esp, [ebp + 0x2114]
pop ebp
ret 0xc