Function at 0x4d7570
Capabilities:
Set registry value

Disassembly:
mov ax, word [esp + 4]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov word [esi + 0x32], ax
mov dword [esi + 0x34], 0
call fcn.004d7890
mov cx, word [esi + 0x32]
cmp cx, 9
je 0x4d76e9
mov edx, dword [esi + 0x60]
xor eax, eax
test edx, edx
jle 0x4d76e9
mov ebx, dword [esi + 0x5c]
mov edi, ecx
and edi, 0xffff
lea ecx, [ebx + 8]
cmp dword [ecx], edi
je 0x4d75c5
inc eax
add ecx, 0x20
cmp eax, edx
jl 0x4d75b4
jmp 0x4d76e9
shl eax, 5
mov ebp, dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov edi, eax
mov dword [esi + 0x34], 1
mov eax, dword [esi + 0x18]
cmp eax, dword [ebx + edi]
je 0x4d75fe
test eax, eax
je 0x4d75ea
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebx + edi]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edx, dword [ebx + edi]
push eax
push edx
call ebp
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x5c]
mov ecx, dword [eax + edi + 0xc]
lea ebx, [eax + edi + 0xc]
mov eax, dword [esi + 4]
cmp eax, ecx
je 0x4d762d
test eax, eax
je 0x4d761b
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edx, dword [ebx]
push eax
push edx
call ebp
mov dword [esi + 4], eax
mov eax, dword [esi + 0x5c]
mov ecx, dword [eax + edi + 0x10]
lea ebx, [eax + edi + 0x10]
mov eax, dword [esi + 8]
cmp eax, ecx
je 0x4d765c
test eax, eax
je 0x4d764a
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edx, dword [ebx]
push eax
push edx
call ebp
mov dword [esi + 8], eax
mov eax, dword [esi + 0x5c]
mov ecx, dword [eax + edi + 0x14]
lea ebx, [eax + edi + 0x14]
mov eax, dword [esi + 0xc]
cmp eax, ecx
je 0x4d768b
test eax, eax
je 0x4d7679
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edx, dword [ebx]
push eax
push edx
call ebp
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x5c]
mov ecx, dword [eax + edi + 0x18]
lea ebx, [eax + edi + 0x18]
mov eax, dword [esi + 0x10]
cmp eax, ecx
je 0x4d76ba
test eax, eax
je 0x4d76a8
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edx, dword [ebx]
push eax
push edx
call ebp
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
mov ecx, dword [eax + edi + 0x1c]
lea edi, [eax + edi + 0x1c]
mov eax, dword [esi + 0x14]
cmp eax, ecx
je 0x4d76e9
test eax, eax
je 0x4d76d7
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [edi]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edx, dword [edi]
push eax
push edx
call ebp
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4d7726
mov edx, dword [0x6ec7a0]
lea ecx, [esp + 0x14]
push 4
push ecx
xor eax, eax
push 4
mov ax, word [esi + 0x32]
push 0
push 0x6c150c
push edx
mov dword [esp + 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, esi
call fcn.004dbb70
pop edi
pop esi
pop ebp
pop ebx
ret 8
mov eax, dword [esi + 0x34]
test eax, eax
jne 0x4d7733
mov word [esi + 0x32], 9
mov ecx, esi
call fcn.004dbb70
pop edi
pop esi
pop ebp
pop ebx
ret 8