Function at 0x4a3670
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 0x4a3961
mov edi, dword [esp + 0x20]
test edi, edi
je 0x4a3961
cmp edi, 0xfffffffe
je 0x4a3961
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [0x4d70f4]
push 0
mov eax, dword [eax + 0xb0]
or eax, 0x20006
push eax
push 0
push 0x4c3c29
push 0
push dword [esp + 0x44]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
test esi, esi
jne 0x4a3966
dec edi
cmp edi, 6
ja case.0x4a36e1.5
jmp dword [edi*4 + 0x4a3994]
mov edx, dword [esp + 0x30]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a36f1
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 0x4a3966
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 0x4a3730
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
push 2
jmp 0x4a3701
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 0x4a3750
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 0x4a3780
push dword [esp + 0x24]
mov esi, 0xe
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4a3966
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 0x4a37a2
cmp byte [esi + edi - 1], 0xa
jne 0x4a37a2
dec esi
mov byte [esi + edi], 0
mov cl, byte [edi]
mov eax, edi
test cl, cl
je 0x4a37c0
nop word [eax + eax]
cmp cl, 0xa
jne 0x4a37b8
mov byte [eax], 0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4a37b0
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 0x4a3966
mov esi, dword [esp + 0x30]
mov al, byte [esi]
test al, al
je 0x4a3886
mov ecx, esi
cmp al, 0x20
je 0x4a3810
cmp al, 9
jne 0x4a3816
mov al, byte [ecx + 1]
inc ecx
jmp 0x4a3808
test al, al
je 0x4a386a
cmp al, 0x2d
je 0x4a3822
cmp al, 0x2b
jne 0x4a3829
lea eax, [ecx + 1]
mov ecx, eax
mov al, byte [eax]
cmp al, 0x30
jne 0x4a386a
mov al, byte [ecx + 1]
cmp al, 0x78
je 0x4a3838
cmp al, 0x58
jne 0x4a386a
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 0x4a386a
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 0x4a3701
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 0x4a3701
xor eax, eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push 4
push eax
push 4
jmp 0x4a3701
mov ebx, dword [esp + 0x30]
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4a38a1
sub ebx, ecx
test bl, 1
jne case.0x4a36e1.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 0x4a376c
xor ebp, ebp
xor edx, edx
test ebx, ebx
jle 0x4a3941
cmp ebp, esi
jge 0x4a3941
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 0x4a3908
movsx eax, cl
sub eax, 0x30
jmp 0x4a3924
lea eax, [ecx - 0x41]
cmp al, 5
ja 0x4a3917
movsx eax, cl
sub eax, 0x37
jmp 0x4a3924
lea eax, [ecx - 0x61]
cmp al, 5
ja 0x4a394a
movsx eax, cl
sub eax, 0x57
mov ecx, esi
inc edx
imul ecx, eax
add ecx, edi
sub esi, 0xf
jns 0x4a38f0
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
mov byte [edi + ebp], cl
inc ebp
cmp edx, ebx
jl 0x4a38e0
push ebp
push edi
push 3
jmp 0x4a37cd
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.0044d3d0
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 0x4a3966