Function at 0x40505b
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
sub esp, 0x820
lea ebp, [esp - 4]
mov eax, dword [0x43e054]
xor eax, ebp
mov dword [ebp + 0x820], eax
push 0x20
mov eax, 0x431caa
call fcn.0042d90d
xor edi, edi
push 0x439eec
lea esi, [ebp - 0x24]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], edi
call fcn.00404fef
push eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], edi
call fcn.00405c8c
pop ecx
pop ecx
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x24]
cmp esi, edi
je 0x4050b3
call fcn.00405add
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
lea eax, [ebp - 0x14]
call fcn.00405c30
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [ebp - 0x10], edi
jne 0x4050f0
mov esi, dword [ebp - 0x14]
cmp esi, edi
je 0x4050e9
call fcn.00405add
xor al, al
jmp 0x405359
cmp dword [ebp - 0x1c], 2
mov esi, 0x439ecc
mov ebx, 0x4358ec
jne 0x40516b
xor eax, eax
push 0x206
mov word [ebp + 0x618], ax
lea eax, [ebp + 0x61a]
push edi
push eax
call fcn.0041aab0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 0x618]
push eax
push edi
push edi
push ebx
push dword [ebp - 0x10]
mov dword [ebp - 0x20], 0x206
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x20]
shr eax, 1
xor ecx, ecx
mov word [ebp + eax*2 + 0x618], cx
cmp word [ebp + 0x618], di
je 0x40516b
lea eax, [ebp + 0x618]
push esi
push eax
call fcn.00418178
pop ecx
pop ecx
test eax, eax
jne 0x4050dd
push esi
call fcn.0041a9d8
pop ecx
lea eax, [eax + eax + 2]
push eax
push esi
push 1
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
lea esi, [ebp - 0x28]
mov dword [ebp - 0x18], edi
call fcn.00404fef
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 3
call fcn.00405c8c
mov esi, dword [ebp - 0x14]
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
cmp esi, edi
je 0x4051b8
call fcn.00405add
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
cmp eax, edi
je 0x4051ca
push eax
call sub.KERNEL32.dll_InterlockedIncrement
mov esi, dword [ebp - 0x2c]
cmp esi, edi
je 0x4051d6
call fcn.00405add
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x28]
cmp esi, edi
je 0x4051e6
call fcn.00405add
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
lea eax, [ebp - 0x14]
call fcn.00405c30
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [ebp - 0x18], edi
je 0x4050dd
mov esi, 0x439eac
push esi
call fcn.0041a9d8
pop ecx
lea eax, [eax + eax + 2]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueW]
push 1
push ebx
push dword [ebp - 0x18]
call esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
push 0x438724
push dword [ebp - 0x18]
mov dword [ebp - 0x10], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [ebp - 0x10], edi
je 0x4050dd
mov eax, dword [0x440400]
cmp eax, edi
jne 0x405280
push 0x104
lea eax, [ebp]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp]
mov dword [0x440400], eax
push eax
push 0x43874c
lea eax, [ebp + 0x208]
push 0x208
push eax
call fcn.00417b76
lea eax, [ebp + 0x208]
push eax
call fcn.0041a9d8
add esp, 0x14
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp + 0x208]
push eax
push 1
push ebx
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
push 0x438768
push dword [ebp - 0x18]
mov dword [ebp - 0x10], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [ebp - 0x10], edi
je 0x4050dd
push dword [0x440400]
lea eax, [ebp + 0x208]
push 0x438780
push 0x208
push eax
call fcn.00417b76
lea eax, [ebp + 0x208]
push eax
call fcn.0041a9d8
add esp, 0x14
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp + 0x208]
push eax
push 1
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x18]
call esi
mov esi, dword [ebp - 0x14]
cmp esi, edi
je 0x405349
call fcn.00405add
push edi
push edi
push edi
push 0x8000000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x820]
xor ecx, ebp
call fcn.004179b6
add ebp, 0x824
leave
ret