Function at 0x402810
Capabilities:
Delete registry value
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x410
mov eax, dword [0x411ce4]
xor eax, esp
mov dword [esp + 0x40c], eax
push esi
mov esi, dword [esp + 0x41c]
push edi
push 0x200
lea eax, [esp + 0x18]
push eax
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test esi, esi
je 0x402875
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x40d700
lea ecx, [esp + 0x18]
push ecx
call edi
push esi
lea edx, [esp + 0x18]
push edx
call edi
lea eax, [esp + 8]
push eax
push 3
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4028af
lea ecx, [esp + 8]
push ecx
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x402a80
lea edx, [esp + 0xc]
push edx
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x218]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0
push str.FTSafeNetRockey4NDService
mov edi, 0x80
push edx
mov dword [esp + 0x28], 1
mov dword [esp + 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov esi, dword [esp + 0x41c]
jne 0x402a27
lea edx, [esp + 0x14]
lea ecx, [esp + 0x214]
mov edi, edi
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x402920
test al, al
je 0x40291c
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x402920
add ecx, 2
add edx, 2
test al, al
jne 0x402900
xor eax, eax
jmp 0x402925
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40297f
test esi, esi
jne 0x40294f
mov eax, dword [esp + 8]
push str.FTSafeNetRockey4NDService
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x402a00
mov edx, dword [esp + 8]
push edx
jmp 0x402a7a
cmp esi, 1
jne 0x402a27
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.0040c056
add esp, 0x410
ret
test esi, esi
jne 0x4029c2
mov ecx, dword [esp + 8]
push str.FTSafeNetRockey4NDService
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x402a75
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.0040c056
add esp, 0x410
ret
cmp esi, 1
jne 0x402a27
mov ecx, dword [esp + 8]
push str.FTSafeNetRockey4NDService
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
mov edx, dword [esp + 8]
jne 0x402949
mov eax, dword [esp + 0xc]
push eax
lea ecx, [esp + 0x18]
push ecx
push esi
push 0
push str.FTSafeNetRockey4NDService
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x402a75
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.0040c056
add esp, 0x410
ret
test esi, esi
jne 0x402a44
mov edx, dword [esp + 8]
push str.FTSafeNetRockey4NDService
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x402a00
jmp 0x402958
cmp esi, 1
jne 0x402a75
mov eax, dword [esp + 8]
push edi
lea edx, [esp + 0x18]
push edx
push esi
push 0
push str.FTSafeNetRockey4NDService
push eax
mov dword [esp + 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40299b
mov ecx, dword [esp + 8]
push ecx
jmp 0x402a7a
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x414]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0040c056
add esp, 0x410
ret