Function at 0x405490
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f6d6
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2124
call fcn.0040f4b0
mov eax, dword [0x4190b8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x2124], eax
lea eax, [ebp - 0x2014]
mov edi, esi
mov dword [ebp - 0x212c], esi
mov dword [ebp - 0x2120], ecx
mov dword [ebp - 0x2130], edx
mov dword [ebp - 0x211c], 0
call fcn.004052e0
test eax, eax
js 0x40586d
lea eax, [ebp - 0x211c]
push eax
lea ebx, [ebp - 0x2014]
call fcn.004051a0
add esp, 4
test eax, eax
jne 0x405526
mov eax, 0x80020009
jmp 0x40586d
call fcn.00405290
lea eax, [ebp - 0x2014]
mov edi, esi
call fcn.004052e0
xor esi, esi
cmp eax, esi
jl 0x40586d
movzx eax, word [ebp - 0x211c]
cmp eax, 0x13
jg 0x405748
je 0x4056ec
cmp eax, 8
je 0x4056cc
cmp eax, 0x11
jne 0x405852
lea ecx, [ebp - 0x2014]
push ecx
call dword [0x4198b0]
mov ebx, eax
mov dword [ebp - 0x2128], ebx
test bl, 1
jne 0x405612
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x211c], edi
mov dword [ebp - 0x2118], esi
xor eax, eax
mov dword [ebp - 4], 3
mov byte [ebp - 4], 4
cmp eax, esi
ja 0x4055b1
cmp edi, 0xffffffff
jbe 0x4055bb
push 0x80070216
call fcn.00404140
cmp edi, 0x100
jbe 0x4055e7
lea edx, [ebp - 0x2118]
push edx
mov eax, edi
call fcn.004092b0
jmp 0x4055f3
lea eax, [ebp - 0x2114]
mov dword [ebp - 0x2118], eax
mov eax, dword [ebp - 0x2118]
test eax, eax
jne 0x40561c
lea ecx, [ebp - 0x2114]
test ecx, ecx
je 0x405612
lea eax, [ebp - 0x2118]
call fcn.00408dd0
mov eax, 0x80004005
jmp 0x40586d
push edi
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
xor esi, esi
test ebx, ebx
jle 0x405686
mov edi, edi
movzx eax, word [ebp + esi*2 - 0x2014]
mov edx, esi
shr edx, 1
add edx, dword [ebp - 0x2118]
lea ecx, [eax - 0x30]
cmp ecx, 0x36
ja case.0x405651.58
movzx ecx, byte [ecx + 0x40589c]
jmp dword [ecx*4 + 0x40588c]
sub al, 0x30
jmp 0x405666
sub al, 0x37
jmp 0x405666
sub al, 0x57
jmp 0x405666
xor al, al
mov ecx, esi
and ecx, 1
add ecx, ecx
lea edi, [ecx + ecx]
mov ecx, 4
sub ecx, edi
shl al, cl
inc esi
or byte [edx], al
cmp esi, ebx
jl 0x405630
mov edi, dword [ebp - 0x211c]
mov ecx, dword [ebp - 0x2118]
mov edx, dword [ebp - 0x2124]
mov eax, dword [edx]
mov edx, dword [ebp - 0x2120]
push edi
push ecx
push 3
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
lea eax, [ebp - 0x2114]
cmp dword [ebp - 0x2118], eax
je 0x405843
lea eax, [ebp - 0x2118]
call fcn.00408dd0
jmp 0x405843
mov ecx, dword [ebp - 0x2120]
mov edx, dword [ebp - 0x2124]
push ecx
push edx
lea esi, [ebp - 0x2014]
call fcn.004047e0
mov ebx, eax
jmp 0x405843
lea eax, [ebp - 0x2128]
push eax
push esi
push esi
lea ecx, [ebp - 0x2014]
push ecx
mov dword [ebp - 0x2134], esi
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov edx, dword [ebp - 0x2128]
mov ecx, dword [ebp - 0x2120]
push 4
lea eax, [ebp - 0x211c]
push eax
push 4
mov dword [ebp - 0x211c], edx
mov edx, dword [ebp - 0x2124]
mov eax, dword [edx]
push esi
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea esi, [ebp - 0x2134]
mov ebx, eax
call fcn.00408500
jmp 0x405843
cmp eax, 0x4008
jne 0x405852
lea ecx, [ebp - 0x2014]
push ecx
call dword [0x4198b0]
add eax, 2
mov dword [ebp - 0x2118], esi
xor ecx, ecx
shld ecx, eax, 1
add eax, eax
mov dword [ebp - 4], esi
mov byte [ebp - 4], 1
cmp ecx, esi
ja 0x405781
cmp eax, 0xffffffff
jbe 0x40578b
push 0x80070216
call fcn.00404140
cmp eax, 0x100
jbe 0x4057a8
lea edx, [ebp - 0x2118]
push edx
call fcn.004092b0
jmp 0x4057b4
lea eax, [ebp - 0x2114]
mov dword [ebp - 0x2118], eax
mov ebx, dword [ebp - 0x2118]
test ebx, ebx
je 0x405825
cmp word [ebp - 0x2014], 0
lea esi, [ebp - 0x2014]
je 0x405803
mov edi, dword [0x4198b4]
push esi
call edi
movzx ecx, word [esi]
cmp ecx, 0x5c
jne 0x4057f4
cmp word [eax], 0x30
jne 0x4057f4
xor ecx, ecx
mov word [ebx], cx
push eax
add ebx, 2
call edi
mov esi, eax
jmp 0x4057fd
mov word [ebx], cx
add ebx, 2
add esi, 2
cmp word [esi], 0
jne 0x4057d4
mov eax, dword [ebp - 0x2124]
xor edx, edx
mov dword [ebx], edx
mov ecx, dword [ebp - 0x2118]
mov edx, dword [ebp - 0x2120]
push ecx
push edx
push eax
call fcn.00404820
mov ebx, eax
jmp 0x40582a
mov ebx, 0xe
lea ecx, [ebp - 0x2114]
cmp dword [ebp - 0x2118], ecx
je 0x405843
lea eax, [ebp - 0x2118]
call fcn.00408dd0
xor esi, esi
cmp ebx, esi
je 0x405852
mov eax, ebx
call fcn.00404310
jmp 0x40586d
mov eax, dword [ebp - 0x2130]
mov edi, dword [ebp - 0x212c]
call fcn.004052e0
xor edx, edx
cmp eax, esi
setge dl
dec edx
and eax, edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040e8fe
mov esp, ebp
pop ebp
ret 8