Function at 0x46e530
Capabilities:
Set registry value

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
mov dword [esp], ecx
push ebx
push ebp
push esi
push edi
test edx, edx
je 0x46e7cc
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x46e7cc
cmp edi, 0xfffffffe
je 0x46e7cc
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [0x4aa1d8]
push 0
mov eax, dword [eax + 0xb0]
or eax, 0x20006
push eax
push 0
push 0x49bc4d
push 0
push dword [esp + 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
test esi, esi
jne 0x46e7d1
dec edi
cmp edi, 6
ja case.0x46e5a0.5
jmp dword [edi*4 + 0x46e800]
mov edx, dword [esp + 0x2c]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46e5b0
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
push 1
push 0
push dword [esp + 0x38]
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [esp + 0x20]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46e7d1
mov edx, dword [esp + 0x2c]
mov ecx, edx
lea esi, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46e5f0
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
push 2
jmp 0x46e5c0
mov ebx, dword [esp + 0x2c]
mov esi, ebx
lea ecx, [esi + 1]
jmp 0x46e610
mov al, byte [esi]
inc esi
test al, al
jne 0x46e610
sub esi, ecx
lea eax, [esi + 2]
push eax
call fcn.00484535
mov edi, eax
add esp, 4
test edi, edi
jne 0x46e63f
push dword [esp + 0x20]
mov esi, 0xe
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46e7d1
push esi
push ebx
push edi
call fcn.00487600
add esp, 0xc
mov word [esi + edi], 0
test esi, esi
je 0x46e660
cmp byte [esi + edi - 1], 0xa
jne 0x46e660
dec esi
mov byte [esi + edi], 0
cmp byte [edi], 0
mov eax, edi
je 0x46e675
cmp byte [eax], 0xa
jne 0x46e66f
mov byte [eax], 0
inc eax
cmp byte [eax], 0
jne 0x46e667
test esi, esi
je 0x46e67e
add esi, 2
jmp 0x46e680
xor esi, esi
push esi
push edi
push 7
push 0
push dword [esp + 0x38]
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push edi
mov esi, eax
call fcn.004843d4
add esp, 4
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46e7d1
mov ecx, dword [esp + 0x2c]
cmp byte [ecx], 0
je 0x46e6ce
call fcn.004133c0
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push 4
push eax
push 4
jmp 0x46e5c0
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push 4
jmp 0x46e5c0
mov ebp, dword [esp + 0x2c]
mov edi, ebp
lea ecx, [edi + 1]
lea ecx, [ecx]
mov al, byte [edi]
inc edi
test al, al
jne 0x46e6f0
sub edi, ecx
mov eax, edi
and eax, 0x80000001
jns 0x46e707
dec eax
or eax, 0xfffffffe
inc eax
jne case.0x46e5a0.5
mov eax, edi
cdq
sub eax, edx
sar eax, 1
push eax
mov dword [esp + 0x28], eax
call fcn.00484535
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
je 0x46e62b
xor ebx, ebx
xor esi, esi
test edi, edi
jle 0x46e788
cmp ebx, dword [esp + 0x24]
jge 0x46e788
xor ecx, ecx
lea edx, [ecx + 0x10]
mov al, byte [esi + ebp]
cmp al, 0x30
jl 0x46e753
cmp al, 0x39
jg 0x46e753
movsx eax, al
sub eax, 0x30
jmp 0x46e771
cmp al, 0x41
jl 0x46e763
cmp al, 0x46
jg 0x46e763
movsx eax, al
sub eax, 0x37
jmp 0x46e771
cmp al, 0x61
jl 0x46e7b6
cmp al, 0x66
jg 0x46e7b6
movsx eax, al
sub eax, 0x57
imul eax, edx
inc esi
add ecx, eax
sub edx, 0xf
jns 0x46e740
mov eax, dword [esp + 0x2c]
mov byte [ebx + eax], cl
inc ebx
cmp esi, edi
jl 0x46e735
push ebx
push eax
push 3
push 0
push dword [esp + 0x38]
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [esp + 0x2c]
mov esi, eax
call fcn.004843d4
add esp, 4
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46e7d1
push dword [esp + 0x2c]
call fcn.004843d4
add esp, 4
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 0x57
mov ecx, dword [esp + 0x10]
test esi, esi
push esi
setne al
movzx eax, al
push eax
call fcn.0042cb40
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0x14
push dword [esp + 0x20]
mov esi, 0x57
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46e7d1