Function at 0x509fe0
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x6554e8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x755898]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x755898]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
xor edi, edi
xor eax, eax
mov ebp, ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
mov word [esp + 0x20], ax
mov dword [esp + 0x34], edi
mov edx, dword [ebp + 0x160]
lea ecx, [esp + 0x1c]
push ecx
push edi
push edi
push 0x147
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
lea ecx, [ebp + 0x15c]
call fcn.00424680
mov esi, dword [ebp + 0x88]
mov eax, dword [esi + 8]
cmp eax, edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
jle 0x50a0db
xor ebx, ebx
cmp ebx, edi
jl 0x50a21e
mov eax, dword [esp + 0x14]
cmp eax, dword [esi + 8]
jge 0x50a21e
mov eax, dword [esi + 4]
mov ecx, dword [eax + ebx + 4]
add eax, ebx
cmp ecx, edi
jne 0x50a08a
lea ecx, [eax + 8]
mov eax, dword [esp + 0x1c]
cmp eax, edi
jne 0x50a096
lea eax, [esp + 0x20]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x50a0bc
cmp dx, di
je 0x50a0b8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x50a0bc
add eax, 4
add ecx, 4
cmp dx, di
jne 0x50a096
xor eax, eax
jmp 0x50a0c1
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x50a189
mov eax, dword [esp + 0x14]
inc eax
add ebx, 0x2c
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
jl 0x50a065
mov eax, dword [ebp + 0x8c]
cmp eax, edi
jne 0x50a0eb
lea eax, [ebp + 0x90]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x50a0f0
mov ecx, dword [ebp + 0x8c]
sub eax, edx
sar eax, 1
cmp ecx, edi
jne 0x50a10f
lea ecx, [ebp + 0x90]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [eax + eax + 2]
mov eax, dword [0x75abd8]
push edx
push ecx
push edi
push edi
push 0x67e1b8
push eax
call esi
mov ecx, dword [ebp + 0x150]
push edi
push edi
push pe_nt_image_headers32
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push edi
mov dword [esp + 0x28], eax
mov eax, dword [0x75abd8]
push str.RememberLastSave
push eax
call esi
mov dword [esp + 0x34], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00401210
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0061d2ff
add esp, 0x24
ret
mov ebx, dword [ebp + 0x8c]
cmp ebx, edi
jne 0x50a199
lea ebx, [ebp + 0x90]
mov edi, dword [esp + 0x14]
cmp edi, dword [esi + 8]
jge 0x50a21e
mov esi, dword [esi + 4]
imul edi, edi, 0x2c
mov eax, dword [esi + edi + 0x20]
add esi, edi
cmp ebx, eax
je 0x50a1dc
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
test ebx, ebx
je 0x50a1d5
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi + 0x20], eax
test eax, eax
jne 0x50a1dc
push 0x8007000e
call fcn.00401090
mov dword [esi + 0x20], 0
mov ecx, dword [ebp + 0x150]
push 0
push 0
push pe_nt_image_headers32
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp + 0x88]
mov edx, dword [esp + 0x14]
cmp edx, dword [ecx + 8]
jge 0x50a21e
mov ecx, dword [ecx + 4]
add ecx, edi
test eax, eax
setne al
mov byte [ecx + 0x24], al
mov ecx, dword [ebp + 0x88]
call fcn.004c3b20
jmp 0x50a159
call fcn.005f16d5
int3