Function at 0x46f7e0
Capabilities:
Set registry value

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x18]
push esi
push edi
test eax, eax
je 0x46fa5d
test ebp, ebp
je 0x46fa5d
cmp ebp, 0xfffffffe
je 0x46fa5d
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [0x4a7978]
lea edx, [esp + 0x24]
push edx
mov edx, dword [ecx + 0xb0]
mov ecx, dword [esp + 0x2c]
push 0
or edx, 0x20006
push edx
push 0
push 0x499861
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edi, eax
test edi, edi
jne 0x46fa99
lea eax, [ebp - 1]
cmp eax, 6
ja case.0x46f84d.5
jmp dword [eax*4 + 0x46faa8]
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46f860
sub eax, edx
mov edx, dword [esp + 0x28]
inc eax
push eax
mov eax, dword [esp + 0x24]
push ebx
push 1
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
jmp 0x46fa8e
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46f890
sub eax, edx
inc eax
push eax
push ebx
push 2
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
jmp 0x46fa8e
mov edi, ebx
lea ecx, [edi + 1]
lea esp, [esp]
mov al, byte [edi]
inc edi
test al, al
jne 0x46f8c0
sub edi, ecx
lea eax, [edi + 2]
push eax
call fcn.004859d9
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x46f8e3
lea edi, [eax + 0xe]
jmp 0x46fa8e
push edi
push ebx
push ebp
call fcn.004887c0
add esp, 0xc
mov word [edi + ebp], 0
test edi, edi
je 0x46f904
cmp byte [edi + ebp - 1], 0xa
jne 0x46f904
dec edi
mov byte [edi + ebp], 0
cmp byte [ebp], 0
mov eax, ebp
je 0x46f91e
lea esp, [esp]
cmp byte [eax], 0xa
jne 0x46f918
mov byte [eax], 0
inc eax
cmp byte [eax], 0
jne 0x46f910
test edi, edi
je 0x46f927
lea eax, [edi + 2]
jmp 0x46f929
xor eax, eax
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
push eax
push ebp
push 7
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push ebp
mov edi, eax
call fcn.00485838
add esp, 4
jmp 0x46fa8e
cmp byte [ebx], 0
je 0x46f96d
mov esi, ebx
call fcn.00413460
mov dword [esp + 0x24], eax
push 4
lea eax, [esp + 0x28]
push eax
push 4
jmp 0x46f89e
push 4
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], 0
push 4
jmp 0x46f89e
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46f988
sub eax, edx
mov ecx, eax
and ecx, 0x80000001
mov dword [esp + 0xc], eax
jns 0x46f9a4
dec ecx
or ecx, 0xfffffffe
inc ecx
jne case.0x46f84d.5
cdq
sub eax, edx
sar eax, 1
push eax
mov dword [esp + 0x14], eax
call fcn.004859d9
mov esi, eax
add esp, 4
test esi, esi
jne 0x46f9ca
lea edi, [eax + 0xe]
jmp 0x46fa8e
xor edi, edi
xor ebp, ebp
cmp dword [esp + 0xc], edi
jle 0x46fa26
cmp ebp, dword [esp + 0x10]
jge 0x46fa26
xor edx, edx
lea ecx, [edx + 0x10]
nop
mov al, byte [edi + ebx]
cmp al, 0x30
jl 0x46f9f3
cmp al, 0x39
jg 0x46f9f3
movsx eax, al
sub eax, 0x30
jmp 0x46fa11
cmp al, 0x41
jl 0x46fa03
cmp al, 0x46
jg 0x46fa03
movsx eax, al
sub eax, 0x37
jmp 0x46fa11
cmp al, 0x61
jl 0x46fa49
cmp al, 0x66
jg 0x46fa49
movsx eax, al
sub eax, 0x57
imul eax, ecx
add edx, eax
inc edi
sub ecx, 0xf
jns 0x46f9e0
mov byte [esi + ebp], dl
inc ebp
cmp edi, dword [esp + 0xc]
jl 0x46f9d4
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push ebp
push esi
push 3
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push esi
mov edi, eax
call fcn.00485838
add esp, 4
jmp 0x46fa8e
push esi
call fcn.00485838
mov ecx, dword [esp + 0x24]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 0x57
mov eax, edi
mov edx, dword [0x4a7978]
mov dword [edx + 0x30], eax
mov edx, dword [esp + 0x1c]
test edi, edi
setne al
movzx ecx, al
push ecx
push edx
call fcn.0042d950
pop edi
pop esi
pop ebp
add esp, 0xc
ret 0x10
mov edi, 0x57
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 0xffffffff
jne 0x46fa62
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x46fa64