Function at 0x42e950
Capabilities:
Delete registry key
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3b4
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
mov edx, ecx
xor eax, eax
push edi
xor esi, esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], edx
mov dword [edx + 0x10b0], esi
mov dword [esp + 0x4c], eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x54], eax
push 0x2001f
mov ecx, 0x38
lea edi, [esp + 0x100]
rep stosd dword es:[edi], eax
xor ecx, ecx
push esi
mov dword [esp + 0x68], ecx
push str.SYSTEMCurrentControlSetControlPowerPowerSettings_f693fb01_e858_4f00_b20f_f30e12ac06d6191f65b5_d45c_4a4f_8aae_1ab8bfd980e6
mov dword [esp + 0x70], ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x54], esi
mov dword [esp + 0x68], eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x78], ecx
mov dword [esp + 0x10c], pe_nt_image_headers32
call ebx
test eax, eax
jne 0x42ea72
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push esi
lea eax, [esp + 0x1dc]
push 0x46de30
push eax
call fcn.0045e6a9
mov edx, dword [esp + 0x28]
add esp, 0xc
lea ecx, [esp + 0x1d8]
push ecx
push edx
call edi
test eax, eax
jne 0x42ea10
inc esi
cmp esi, 5
jb 0x42e9e1
lea eax, [esp + 0x18]
push eax
push 0x2001f
push 0
push str.SYSTEMCurrentControlSetControlPowerPowerSettings_f693fb01_e858_4f00_b20f_f30e12ac06d6191f65b5_d45c_4a4f_8aae_1ab8bfd980e6DefaultPowerSchemeValues
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x42ea5d
mov ecx, dword [esp + 0x18]
push str.381b4222_f694_41f0_9685_ff5bb260df2e
push ecx
call edi
mov edx, dword [esp + 0x18]
push str.8c5e7fda_e8bf_4a96_9a85_a6e23a8c635c
push edx
call edi
mov eax, dword [esp + 0x18]
push str.a1841308_3541_4fab_bc81_f71556f20b4a
push eax
call edi
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov edx, dword [esp + 0x1c]
push str.DefaultPowerSchemeValues
push edx
call edi
mov eax, dword [esp + 0x1c]
push eax
call esi
xor esi, esi
mov ebx, dword [esp + 0x2c]
mov eax, dword [ebx + 0x11c]
test eax, eax
jbe 0x42eaa4
lea edi, [ebx + 0x120]
push 3
mov ecx, edi
call fcn.00437340
test al, 0x10
jne 0x42eaad
mov eax, dword [ebx + 0x11c]
inc esi
add edi, 0x20c
cmp esi, eax
jb 0x42ea86
call fcn.0040b2d0
test al, al
js 0x42eab8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor eax, eax
mov ecx, 0x6a
lea edi, [esp + 0x218]
rep stosd dword es:[edi], eax
xor edi, edi
push edi
lea ecx, [esp + 0x21c]
push ecx
or eax, 0xffffffff
push edi
push edi
mov dword [esp + 0x228], 0x1a8
xor esi, esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
call dword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
je 0x42ee0c
jmp 0x42eb10
mov al, byte [esp + 0x2bc]
inc esi
test al, 1
mov dword [esp + 0x58], esi
je 0x42edb6
push edi
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x224]
push eax
call fcn.0044d9e0
add esp, 0xc
test eax, eax
je 0x42eb5c
cmp dword [esp + 0x64], edi
je 0x42eb5c
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x220]
push edx
mov ecx, ebx
call fcn.0042e7b0
jmp 0x42edb6
push edi
lea eax, [esp + 0xfc]
push eax
lea ecx, [esp + 0x224]
push ecx
call fcn.0044cbc0
add esp, 0xc
test eax, eax
je 0x42edb6
mov eax, dword [esp + 0x100]
mov edi, 1
cmp eax, edi
jbe 0x42edb6
xor esi, esi
push esi
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x224]
push eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
call fcn.0044c960
add esp, 0xc
test eax, eax
je 0x42eca5
test byte [esp + 0x10], 1
je 0x42ec0a
mov dword [esp + 0xc], edi
xor eax, eax
push eax
mov ecx, 0x24
lea edi, [esp + 0x6c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x228]
push 1
push eax
call fcn.0044c990
add esp, 0x14
test eax, eax
je 0x42ec0a
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x38], edx
mov esi, ecx
test byte [esp + 0x10], 2
je 0x42ec5d
xor eax, eax
push eax
mov ecx, 0x24
lea edi, [esp + 0x6c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x228]
push 1
push edx
mov dword [esp + 0x20], 2
call fcn.0044c990
add esp, 0x14
test eax, eax
je 0x42ec5d
or esi, dword [esp + 0x88]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x14], esi
mov dword [esp + 0x3c], eax
test byte [esp + 0x10], 3
je 0x42eca5
xor eax, eax
push eax
mov ecx, 0x24
lea edi, [esp + 0x6c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x228]
push 1
push eax
mov dword [esp + 0x20], 3
call fcn.0044c990
add esp, 0x14
test eax, eax
je 0x42eca5
or esi, dword [esp + 0x88]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x100]
xor ebx, ebx
xor ecx, ecx
test edi, edi
mov dword [esp + 0x30], ebx
jbe 0x42ee0c
lea eax, [esp + 0x104]
mov edx, 1
shl edx, cl
test esi, edx
je 0x42ecd6
mov edx, dword [eax]
test dh, 1
jne 0x42ecd6
inc ebx
inc ecx
add eax, 0x20
cmp ecx, edi
jb 0x42ecc3
cmp ebx, 5
mov dword [esp + 0x30], ebx
ja 0x42ee0c
cmp ebx, 1
jbe 0x42ee0c
xor eax, eax
mov ecx, 1
cmp edi, ecx
mov dword [esp + 0x40], eax
jbe 0x42ed55
lea esi, [esp + 0x124]
lea ebx, [ebx]
mov ebx, dword [esp + 0x14]
mov edx, 1
shl edx, cl
test ebx, edx
je 0x42ed49
mov edx, dword [esi]
test dh, 1
jne 0x42ed49
test dh, 2
je 0x42ed44
mov edx, dword [esp + 0x28]
test edx, edx
jne 0x42ed44
mov dword [esp + eax*4 + 0x40], 0
inc eax
mov dword [esp + 0x28], 1
mov dword [esp + eax*4 + 0x40], ecx
inc eax
inc ecx
add esi, 0x20
cmp ecx, edi
jb 0x42ed10
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x42ed66
mov dword [esp + eax*4 + 0x40], 0
inc eax
cmp eax, ebx
je 0x42ed77
push str.Valid_Power_State_number_is_wrong__n
call fcn.0040aab0
add esp, 4
xor eax, eax
test ebx, ebx
jbe 0x42eda0
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
dec edx
dec esi
mov ecx, dword [esp + eax*4 + 0x40]
cmp ecx, edx
jne 0x42ed93
mov dword [esp + 0x24], eax
cmp ecx, esi
jne 0x42ed9b
mov dword [esp + 0x20], eax
inc eax
cmp eax, ebx
jb 0x42ed87
cmp dword [esp + 0x24], 0xffffffff
je 0x42edae
cmp dword [esp + 0x20], 0xffffffff
jne 0x42edde
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x58]
xor edi, edi
push edi
lea eax, [esp + 0x21c]
push eax
push esi
push edi
call dword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
jne 0x42eb10
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x44]
push edx
push eax
push ecx
push ebx
mov ecx, esi
call fcn.0042de60
mov eax, 1
mov dword [esp + 0x34], eax
mov dword [esi + 0x10b0], eax
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4