Function at 0x492a40
Capabilities:
Set registry value

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x14]
mov dword [esp + 4], ecx
push ebx
push ebp
push esi
push edi
test edx, edx
je 0x492ca0
mov edi, dword [esp + 0x20]
test edi, edi
je 0x492ca0
cmp edi, 0xfffffffe
je 0x492ca0
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [0x4e498c]
push 0
mov eax, dword [eax + 0xb0]
or eax, 0x20006
push eax
push 0
push 0x4d0335
push 0
push dword [esp + 0x44]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
test esi, esi
jne 0x492cda
dec edi
cmp edi, 6
ja case.0x492ab1.5
jmp dword [edi*4 + 0x492cec]
mov edx, dword [esp + 0x30]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x492ac1
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
push 1
push 0
push dword [esp + 0x3c]
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
jmp 0x492cd0
mov edx, dword [esp + 0x30]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x492af1
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
push 2
jmp 0x492ad1
mov ebx, dword [esp + 0x30]
mov esi, ebx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x492b10
sub esi, ecx
lea eax, [esi + 2]
push eax
call fcn.004b2c3e
mov edi, eax
add esp, 4
test edi, edi
jne 0x492b33
lea esi, [eax + 0xe]
jmp 0x492cd0
push esi
push ebx
push edi
call fcn.004b9880
add esp, 0xc
mov word [esi + edi], 0
test esi, esi
je 0x492b54
cmp byte [esi + edi - 1], 0xa
jne 0x492b54
dec esi
mov byte [esi + edi], 0
mov cl, byte [edi]
mov eax, edi
test cl, cl
je 0x492b70
nop dword [eax]
cmp cl, 0xa
jne 0x492b68
mov byte [eax], 0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x492b60
lea eax, [esi + 2]
neg esi
sbb esi, esi
and esi, eax
push esi
push edi
push 7
push 0
push dword [esp + 0x3c]
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push edi
mov esi, eax
call fcn.004b2343
add esp, 4
jmp 0x492cd0
mov ecx, dword [esp + 0x30]
cmp byte [ecx], 0
je 0x492bbd
call fcn.00404660
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push 4
push eax
push 4
jmp 0x492ad1
xor eax, eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push 4
push eax
push 4
jmp 0x492ad1
mov ebx, dword [esp + 0x30]
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x492bd8
sub ebx, ecx
test bl, 1
jne case.0x492ab1.5
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push esi
mov dword [esp + 0x14], esi
call fcn.004b2c3e
mov edi, eax
add esp, 4
mov dword [esp + 0x20], edi
test edi, edi
jne 0x492c12
lea esi, [eax + 0xe]
jmp 0x492cd0
xor ebp, ebp
xor edx, edx
test ebx, ebx
jle 0x492c81
nop word [eax + eax]
cmp ebp, esi
jge 0x492c81
xor ecx, ecx
lea esi, [ecx + 0x10]
nop dword [eax]
mov eax, dword [esp + 0x30]
mov edi, ecx
mov cl, byte [edx + eax]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x492c48
movsx eax, cl
sub eax, 0x30
jmp 0x492c64
lea eax, [ecx - 0x41]
cmp al, 5
ja 0x492c57
movsx eax, cl
sub eax, 0x37
jmp 0x492c64
lea eax, [ecx - 0x61]
cmp al, 5
ja 0x492c8a
movsx eax, cl
sub eax, 0x57
mov ecx, esi
inc edx
imul ecx, eax
add ecx, edi
sub esi, 0xf
jns 0x492c30
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
mov byte [edi + ebp], cl
inc ebp
cmp edx, ebx
jl 0x492c20
push ebp
push edi
push 3
jmp 0x492b7d
push dword [esp + 0x20]
call fcn.004b2343
add esp, 4
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 0x57
mov ecx, esi
mov eax, dword [0x4e498c]
test esi, esi
mov dword [eax + 0x30], ecx
setne al
mov ecx, dword [esp + 0x14]
movzx eax, al
push eax
call fcn.004469f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x14
mov esi, 0x57
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 0xffffffff
jne 0x492ca5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
jmp 0x492ca7