Function at 0x407e90
Capabilities:
Manipulate safe mode programs

Disassembly:
push 0xffffffffffffffff
push 0x40eb00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov al, byte [esp + 3]
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0xc]
mov byte [esp + 0xc], al
call fcn.004021d0
lea ecx, [esp + 8]
push str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootMinimalBCSvc
push ecx
mov dword [esp + 0x38], 0
call fcn.00401460
mov eax, dword [esp + 0x14]
add esp, 8
test eax, eax
jne 0x407ee5
mov eax, 0x40f15c
push eax
mov ecx, esi
call fcn.00407070
test eax, eax
je 0x407f1c
lea edx, [esp + 8]
push str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootMinimal_am
push edx
call fcn.00401460
mov eax, dword [esp + 0x14]
add esp, 8
test eax, eax
jne 0x407f10
mov eax, 0x40f15c
push eax
mov ecx, esi
call fcn.00407070
test eax, eax
jne 0x407f42
push 1
lea ecx, [esp + 0xc]
mov dword [esp + 0x34], 0xffffffff
call fcn.004021d0
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
lea eax, [esp + 8]
push str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetworkBCSvc
push eax
call fcn.00401460
mov eax, dword [esp + 0x14]
add esp, 8
test eax, eax
jne 0x407f61
mov eax, 0x40f15c
push eax
mov ecx, esi
call fcn.00407070
test eax, eax
jne 0x407f76
mov ecx, dword [esp + 0xc]
jmp 0x408037
xor ecx, ecx
cmp ecx, str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetwork_am
jne 0x407f96
mov edx, dword [0x40f158]
push edx
push ecx
lea ecx, [esp + 0x10]
call fcn.004016a0
jmp 0x40801a
mov eax, dword [esp + 0xc]
test eax, eax
je 0x407ffa
cmp eax, str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetwork_am
ja 0x407ffa
mov ecx, dword [esp + 0x10]
add ecx, eax
cmp ecx, str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetwork_am
jb 0x407ffa
mov edx, dword [0x40f158]
mov ecx, str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetwork_am
push edx
sub ecx, eax
lea edx, [esp + 0x1c]
push ecx
push edx
lea ecx, [esp + 0x14]
call fcn.004017c0
mov ecx, dword [0x40f158]
mov byte [esp + 0x30], 1
push ecx
push 0
push eax
lea ecx, [esp + 0x14]
call fcn.00401d20
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], 0
call fcn.004021d0
jmp 0x40801a
push edi
mov edi, str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetwork_am
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetwork_am
lea ecx, [esp + 0x14]
call fcn.00401f20
pop edi
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x408027
mov eax, 0x40f15c
push eax
mov ecx, esi
call fcn.00407070
mov ecx, dword [esp + 0xc]
test eax, eax
jne 0x40807b
test ecx, ecx
je 0x408068
mov al, byte [ecx - 1]
test al, al
je 0x40805e
cmp al, 0xff
je 0x40805e
dec al
pop esi
mov byte [ecx - 1], al
or eax, 0xffffffff
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
dec ecx
push ecx
call fcn.00408750
add esp, 4
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
test ecx, ecx
je 0x4080ab
mov al, byte [ecx - 1]
test al, al
je 0x4080a1
cmp al, 0xff
je 0x4080a1
dec al
pop esi
mov byte [ecx - 1], al
xor eax, eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
dec ecx
push ecx
call fcn.00408750
add esp, 4
mov ecx, dword [esp + 0x28]
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x30
ret