Function at 0x496080
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 0x496371
mov edi, dword [esp + 0x20]
test edi, edi
je 0x496371
cmp edi, 0xfffffffe
je 0x496371
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [0x4c8024]
push 0
mov eax, dword [eax + 0xb0]
or eax, 0x20006
push eax
push 0
push 0x4b6ba9
push 0
push dword [esp + 0x44]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
test esi, esi
jne 0x496376
dec edi
cmp edi, 6
ja case.0x4960f1.5
jmp dword [edi*4 + 0x4963a4]
mov edx, dword [esp + 0x30]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x496101
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]
push dword [esp + 0x24]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x496376
mov edx, dword [esp + 0x30]
mov ecx, edx
lea esi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x496140
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
push 2
jmp 0x496111
mov ebx, dword [esp + 0x30]
mov esi, ebx
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x496160
sub esi, ecx
lea eax, [esi + 2]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x496190
push dword [esp + 0x24]
mov esi, 0xe
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x496376
push esi
push ebx
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov word [esi + edi], 0
test esi, esi
je 0x4961b2
cmp byte [esi + edi - 1], 0xa
jne 0x4961b2
dec esi
mov byte [esi + edi], 0
mov cl, byte [edi]
mov eax, edi
test cl, cl
je 0x4961d0
nop word [eax + eax]
cmp cl, 0xa
jne 0x4961c8
mov byte [eax], 0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4961c0
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 dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x496376
mov esi, dword [esp + 0x30]
mov al, byte [esi]
test al, al
je 0x496296
mov ecx, esi
cmp al, 0x20
je 0x496220
cmp al, 9
jne 0x496226
mov al, byte [ecx + 1]
inc ecx
jmp 0x496218
test al, al
je 0x49627a
cmp al, 0x2d
je 0x496232
cmp al, 0x2b
jne 0x496239
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x49627a
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x496248
cmp al, 0x58
jne 0x49627a
movsx eax, byte [ecx + 2]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isxdigit]
add esp, 4
test eax, eax
je 0x49627a
push 0x10
push 0
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__strtoi64]
add esp, 0xc
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push 4
push eax
push 4
jmp 0x496111
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__atoi64]
add esp, 4
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push 4
push eax
push 4
jmp 0x496111
xor eax, eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push 4
push eax
push 4
jmp 0x496111
mov ebx, dword [esp + 0x30]
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4962b1
sub ebx, ecx
test bl, 1
jne case.0x4960f1.5
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push esi
mov dword [esp + 0x14], esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
mov dword [esp + 0x20], edi
test edi, edi
je 0x49617c
xor ebp, ebp
xor edx, edx
test ebx, ebx
jle 0x496351
cmp ebp, esi
jge 0x496351
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 0x496318
movsx eax, cl
sub eax, 0x30
jmp 0x496334
lea eax, [ecx - 0x41]
cmp al, 5
ja 0x496327
movsx eax, cl
sub eax, 0x37
jmp 0x496334
lea eax, [ecx - 0x61]
cmp al, 5
ja 0x49635a
movsx eax, cl
sub eax, 0x57
mov ecx, esi
inc edx
imul ecx, eax
add ecx, edi
sub esi, 0xf
jns 0x496300
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
mov byte [edi + ebp], cl
inc ebp
cmp edx, ebx
jl 0x4962f0
push ebp
push edi
push 3
jmp 0x4961dd
push dword [esp + 0x20]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 0x57
mov ecx, dword [esp + 0x14]
test esi, esi
push esi
setne al
movzx eax, al
push eax
call fcn.0043e820
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x14
push dword [esp + 0x24]
mov esi, 0x57
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x496376