Function at 0x42ee50
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], 0xe0
call ebx
test eax, eax
jne 0x42ef72
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push esi
lea eax, [esp + 0x1dc]
push 0x46de30
push eax
call fcn.0045ebd9
mov edx, dword [esp + 0x28]
add esp, 0xc
lea ecx, [esp + 0x1d8]
push ecx
push edx
call edi
test eax, eax
jne 0x42ef10
inc esi
cmp esi, 5
jb 0x42eee1
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 0x42ef5d
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 0x42efa4
lea edi, [ebx + 0x120]
push 3
mov ecx, edi
call fcn.00437840
test al, 0x10
jne 0x42efad
mov eax, dword [ebx + 0x11c]
inc esi
add edi, 0x20c
cmp esi, eax
jb 0x42ef86
call fcn.0040b2d0
test al, al
js 0x42efb8
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 0x42f30c
jmp 0x42f010
mov al, byte [esp + 0x2bc]
inc esi
test al, 1
mov dword [esp + 0x58], esi
je 0x42f2b6
push edi
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x224]
push eax
call fcn.0044dee0
add esp, 0xc
test eax, eax
je 0x42f05c
cmp dword [esp + 0x64], edi
je 0x42f05c
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x220]
push edx
mov ecx, ebx
call fcn.0042ecb0
jmp 0x42f2b6
push edi
lea eax, [esp + 0xfc]
push eax
lea ecx, [esp + 0x224]
push ecx
call fcn.0044d0c0
add esp, 0xc
test eax, eax
je 0x42f2b6
mov eax, dword [esp + 0x100]
mov edi, 1
cmp eax, edi
jbe 0x42f2b6
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.0044ce60
add esp, 0xc
test eax, eax
je 0x42f1a5
test byte [esp + 0x10], 1
je 0x42f10a
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.0044ce90
add esp, 0x14
test eax, eax
je 0x42f10a
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 0x42f15d
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.0044ce90
add esp, 0x14
test eax, eax
je 0x42f15d
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 0x42f1a5
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.0044ce90
add esp, 0x14
test eax, eax
je 0x42f1a5
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 0x42f30c
lea eax, [esp + 0x104]
mov edx, 1
shl edx, cl
test esi, edx
je 0x42f1d6
mov edx, dword [eax]
test dh, 1
jne 0x42f1d6
inc ebx
inc ecx
add eax, 0x20
cmp ecx, edi
jb 0x42f1c3
cmp ebx, 5
mov dword [esp + 0x30], ebx
ja 0x42f30c
cmp ebx, 1
jbe 0x42f30c
xor eax, eax
mov ecx, 1
cmp edi, ecx
mov dword [esp + 0x40], eax
jbe 0x42f255
lea esi, [esp + 0x124]
lea ebx, [ebx]
mov ebx, dword [esp + 0x14]
mov edx, 1
shl edx, cl
test ebx, edx
je 0x42f249
mov edx, dword [esi]
test dh, 1
jne 0x42f249
test dh, 2
je 0x42f244
mov edx, dword [esp + 0x28]
test edx, edx
jne 0x42f244
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 0x42f210
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x42f266
mov dword [esp + eax*4 + 0x40], 0
inc eax
cmp eax, ebx
je 0x42f277
push str.Valid_Power_State_number_is_wrong__n
call fcn.0040aab0
add esp, 4
xor eax, eax
test ebx, ebx
jbe 0x42f2a0
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 0x42f293
mov dword [esp + 0x24], eax
cmp ecx, esi
jne 0x42f29b
mov dword [esp + 0x20], eax
inc eax
cmp eax, ebx
jb 0x42f287
cmp dword [esp + 0x24], 0xffffffff
je 0x42f2ae
cmp dword [esp + 0x20], 0xffffffff
jne 0x42f2de
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 0x42f010
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.0042e360
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