Function at 0x509800
Capabilities:
Delete file
Get common file path
Hide graphical window
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x51ca8b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x46c
push ebx
push esi
push edi
push str.SoftwareSysinternalsRootkitRevealer
call fcn.0050cfd9
add esp, 4
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x480], 0
push ecx
push 0x20019
push 0
push eax
push SysReAllocString
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov eax, dword [str.Windowplacement]
test eax, eax
je 0x50999a
mov esi, 0x521848
mov eax, dword [esi - 0xc]
cmp eax, 7
ja case.default.0x50987e
jmp dword [eax*4 + 0x509c50]
fld qword [esi]
call fcn.0050c5f0
mov edi, dword [esi - 4]
lea edx, [esp + 0x18]
push edx
mov ebx, eax
mov eax, dword [esi - 0x10]
push edi
push 0
push 0
push eax
mov eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x30], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je case.default.0x50987e
mov dword [edi], ebx
jmp case.default.0x50987e
fld qword [esi]
call fcn.0050c5f0
mov ecx, dword [esi - 4]
mov edx, dword [esi - 0x10]
push eax
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00509c80
jmp case.default.0x50987e
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov edx, dword [esi - 4]
push eax
mov eax, dword [esi - 0x10]
push ecx
push edx
push eax
lea ecx, [esp + 0x20]
call fcn.00509d20
jmp case.default.0x50987e
fld qword [esi]
call fcn.0050c5f0
mov ecx, dword [esi - 4]
mov edx, dword [esi - 0x10]
push eax
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00509cd0
jmp case.default.0x50987e
fld qword [esi]
call fcn.0050c5f0
mov ecx, dword [esi - 4]
mov edx, dword [esi - 0x10]
push eax
mov eax, dword [esi - 8]
push eax
push ecx
push edx
lea ecx, [esp + 0x20]
call fcn.00509d60
jmp case.default.0x50987e
mov ecx, dword [esi - 8]
mov eax, dword [esi - 4]
mov edx, dword [esi - 0x10]
push eax
shr ecx, 2
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00509da0
jmp case.default.0x50987e
mov ecx, dword [esi - 8]
mov eax, dword [esi - 4]
mov edx, dword [esi - 0x10]
push eax
shr ecx, 1
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00509e30
jmp case.default.0x50987e
mov eax, dword [esi - 8]
mov edx, dword [esi - 4]
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [esi - 0x10]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [esi + 8]
add esi, 0x18
test eax, eax
jne 0x509872
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5099a9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push edx
push eax
push 1
call fcn.005093f0
add esp, 0xc
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.0050b1b0
push 0x527bcc
push str.RKREVEAL150
call fcn.004f83f0
add esp, 8
test eax, eax
jne 0x509ab6
lea ecx, [esp + 0x270]
push 0x208
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edx, [esp + 0x270]
push str.RKREVEAL150.SYS
push edx
lea eax, [esp + 0x70]
push str._sDrivers_s
push eax
call fcn.0050bdff
lea ecx, [esp + 0x78]
push ecx
push 0xb1
call fcn.004f8370
add esp, 0x18
test al, al
jne 0x509a55
push str.Error_extracting_helper_driver
push 0
call fcn.00504ec0
mov edx, dword [esp + 0x18]
push edx
call fcn.0050c97b
add esp, 0xc
mov ecx, dword [esp + 0x478]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [esp + 0x68]
push 0x527bcc
push eax
push str.RKREVEAL150
call fcn.004f8490
add esp, 0xc
test eax, eax
jne 0x509aab
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push str.Error_loading_helper_driver
push 0
call fcn.00504ec0
mov edx, dword [esp + 0x18]
push edx
call fcn.0050c97b
add esp, 0xc
mov ecx, dword [esp + 0x478]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, 0x51d55c
mov ecx, dword [eax]
add eax, 8
cmp eax, 0x51d5bc
mov byte [ecx], 1
jb 0x509abb
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x20]
push 0x89
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], eax
mov eax, dword [0x5277c4]
push eax
mov dword [esp + 0x24], 0x30
mov dword [esp + 0x2c], 0x5080d0
mov dword [esp + 0x34], 0x1e
mov dword [esp + 0x38], eax
call dword [sym.imp.USER32.dll_LoadIconW]
push 0x7f00
push 0
mov dword [esp + 0x3c], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
push 0xf
mov dword [esp + 0x3c], eax
call dword [sym.imp.USER32.dll_GetSysColorBrush]
lea edx, [esp + 0x1c]
mov dword [esp + 0x3c], eax
push edx
mov dword [esp + 0x48], 0x522760
call dword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
je 0x509c2a
mov ecx, dword [0x5277c4]
push 0
push 0x5080d0
push 0
push 0xa9
push ecx
call dword [sym.imp.USER32.dll_CreateDialogParamW]
test eax, eax
mov dword [0x5277bc], eax
jne 0x509b73
mov edx, dword [esp + 0x10]
push edx
jmp 0x509c2f
push 0x5277c8
push eax
call dword [sym.imp.USER32.dll_SetWindowPlacement]
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
test eax, eax
jne 0x509b93
mov eax, dword [0x5277bc]
push 5
push eax
call esi
mov ecx, dword [0x5277bc]
push 5
push ecx
call esi
mov edx, dword [0x5277bc]
push edx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x5277c4]
push str.ACCELERATORS
push eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
push 0
push 0
lea ecx, [esp + 0x54]
push 0
push ecx
mov esi, eax
call edi
test eax, eax
je 0x509c2a
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorW]
mov eax, dword [0x5277bc]
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x509c19
mov edx, dword [0x5277bc]
lea ecx, [esp + 0x4c]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x509c19
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
lea edx, [esp + 0x54]
push 0
push edx
call edi
test eax, eax
jne 0x509bdb
mov eax, dword [esp + 0x10]
push eax
call fcn.0050c97b
mov ecx, dword [esp + 0x47c]
add esp, 4
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8