Function at 0x405761
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x2108]
mov eax, 0x2108
call fcn.00482980
push 0xffffffffffffffff
push 0x49f8e3
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4d3a00]
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 edi, ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
mov esi, dword [ebp + 0x2110]
mov dword [ebp - 0x20], esi
mov eax, dword [ebp + 0x2114]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x2118]
mov dword [ebp - 0x38], eax
xor ebx, ebx
mov dword [ebp - 0x14], ebx
lea eax, [ebp + 0x104]
push eax
call fcn.00405623
test eax, eax
js 0x405b55
lea edx, [ebp - 0x14]
lea ecx, [ebp + 0x104]
call fcn.00405526
test eax, eax
jne 0x4057f9
mov eax, 0x80020009
jmp 0x405b55
mov ecx, edi
call fcn.004055fa
lea eax, [ebp + 0x104]
push eax
mov ecx, edi
call fcn.00405623
test eax, eax
js 0x405b55
movzx eax, word [ebp - 0x14]
sub eax, 8
je 0x405b06
sub eax, 9
je 0x405993
dec eax
dec eax
je 0x405947
sub eax, 0x3ff5
jne 0x405b42
lea ecx, [ebp + 0x104]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x405848
sub ecx, edx
sar ecx, 1
add ecx, 2
mov dword [ebp], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
xor eax, eax
shld eax, ecx, 1
add ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], eax
cmp eax, ebx
ja 0x405899
cmp ecx, 0xffffffff
ja 0x405899
cmp ecx, 0x100
jbe 0x40588e
push ecx
lea ecx, [ebp]
call fcn.0040cf43
jmp 0x405894
lea eax, [ebp + 4]
mov dword [ebp], eax
mov dword [ebp - 4], ebx
jmp 0x4058b4
push 0x80070216
call fcn.004046a6
mov eax, 0x4058a9
ret
mov esi, dword [ebp]
test esi, esi
je 0x405919
lea edi, [ebp + 0x104]
cmp word [ebp + 0x104], 0
je 0x405903
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x4058f5
push 0x30
pop edx
cmp word [eax], dx
jne 0x4058f5
xor ecx, ecx
mov word [esi], cx
add esi, 2
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x4058fe
mov word [esi], cx
add esi, 2
add edi, 2
cmp word [edi], bx
jne 0x4058cb
xor eax, eax
mov dword [esi], eax
push dword [ebp]
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
call fcn.00404d84
mov esi, eax
jmp 0x40591c
push 0xe
pop esi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x405930
lea ecx, [ebp]
call fcn.0040cac3
mov edi, dword [ebp - 0x1c]
test esi, esi
je 0x405b42
mov ecx, esi
call fcn.0040473e
jmp 0x405b55
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], 3
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
test eax, eax
jns 0x405971
or dword [ebp - 4], 0xffffffff
jmp 0x405b55
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push ebx
push dword [ebp - 0x18]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
or dword [ebp - 4], 0xffffffff
jmp 0x405933
lea ecx, [ebp + 0x104]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40599c
sub ecx, edx
sar ecx, 1
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], ecx
test cl, 1
je 0x4059c0
mov eax, 0x80004005
jmp 0x405b55
mov eax, ecx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x28], edi
mov dword [ebp], ebx
mov dword [ebp - 4], 4
mov byte [ebp - 4], 5
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], ebx
cmp ebx, ebx
ja 0x405899
cmp edi, 0xffffffff
ja 0x405899
cmp edi, 0x100
jbe 0x405a07
push edi
lea ecx, [ebp]
call fcn.0040cf43
jmp 0x405a0d
lea eax, [ebp + 4]
mov dword [ebp], eax
mov dword [ebp - 4], 4
mov esi, dword [ebp - 0x30]
jmp 0x405a37
cmp dword [ebp], 0
jne 0x405a5a
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x4059b6
lea ecx, [ebp]
call fcn.0040cac3
jmp 0x4059b6
push edi
push ebx
push dword [ebp]
call fcn.00482250
add esp, 0xc
test esi, esi
jle 0x405ad2
push 0x30
pop ecx
mov edi, ebx
mov eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp]
mov dword [ebp - 0x28], eax
movzx edx, word [ebp + edi*2 + 0x104]
mov eax, edx
cmp eax, ecx
jl 0x405ab1
cmp eax, 0x39
jle 0x405aac
cmp eax, 0x40
jle 0x405ab1
cmp eax, 0x46
jle 0x405aa7
add eax, 0xffffff9f
cmp eax, 5
ja 0x405ab1
sub dl, 0x57
jmp 0x405ab3
sub dl, 0x37
jmp 0x405ab3
sub dl, 0x30
jmp 0x405ab3
mov dl, bl
mov eax, edi
and eax, 1
shl eax, 2
push 4
pop ecx
sub ecx, eax
shl dl, cl
mov eax, dword [ebp - 0x28]
or byte [eax], dl
inc edi
cmp edi, esi
push 0x30
pop ecx
jl 0x405a70
mov edi, dword [ebp - 0x14]
push edi
push dword [ebp]
push 3
push ebx
push dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x405930
lea ecx, [ebp]
call fcn.0040cac3
jmp 0x405930
lea ecx, [ebp + 0x104]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x405b0f
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp + 0x104]
push eax
push 1
push ebx
push dword [ebp - 0x18]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
jmp 0x405933
push dword [ebp - 0x38]
mov ecx, edi
call fcn.00405623
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 + 0x2104]
xor ecx, ebp
call fcn.0047aabf
lea esp, [ebp + 0x2108]
pop ebp
ret 0xc