Function at 0x10040740
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10071786
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x100871e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x80], ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov edx, dword [ebx]
test edx, edx
je 0x1004084a
lea ecx, [ebp - 0x64]
push ecx
mov dword [ebp - 0x64], 0
mov eax, dword [edx]
push 2
push edx
call dword [eax + 0x3c]
test eax, eax
jne 0x1004084a
mov eax, dword [0x10089660]
test al, 1
jne 0x100407d7
or eax, 1
mov dword [0x10089660], eax
mov dword [ebp - 4], 0
mov ecx, dword [0x1008954c]
push 0x678c
call fcn.1002ab40
mov dword [0x10089664], eax
mov dword [ebp - 4], 0xffffffff
jmp 0x100407dc
mov eax, dword [0x10089664]
lea ecx, [ebp - 0x60]
push ecx
push 0x2001f
push 0
push eax
push dword [ebp - 0x64]
mov dword [ebp - 0x60], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x6c], eax
cmp eax, 2
jne 0x1004083b
cmp dword [ebp - 0x68], 0
jne 0x10040816
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
jmp 0x10040ce2
push 0
lea eax, [ebp - 0x60]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
push dword [0x10089664]
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x60], 0
jne 0x10040851
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
jmp 0x10040ce2
lea ecx, [ebp - 0x58]
call fcn.1002b500
mov dword [ebp - 4], 1
xor ebx, ebx
cmp ebx, 0x100
jge 0x100409d4
xor eax, eax
xorps xmm0, xmm0
push 0x80
mov word [ebp - 0x24], ax
movq qword [ebp - 0x22], xmm0
movq qword [ebp - 0x1a], xmm0
mov word [ebp - 0x12], ax
mov dword [ebp - 0x78], 0xa
call fcn.100429a1
add esp, 4
mov edi, eax
lea eax, [ebp - 0x4c]
push eax
push edi
lea eax, [ebp - 0x70]
push eax
push 0
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push dword [ebp - 0x60]
mov dword [ebp - 0x4c], 0x80
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov dword [ebp - 0x5c], eax
test eax, eax
jne 0x100409bd
cmp dword [ebp - 0x70], 1
jne 0x100409bd
mov ecx, edi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100408e0
sub ecx, edx
sar ecx, 1
cmp ecx, 0x20
jne 0x100409bd
mov byte [ebp - 0x4d], al
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000deb0
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x48]
call fcn.1000df50
test al, al
je 0x10040986
lea ecx, [ebp - 0x48]
call fcn.1000df10
mov eax, dword [eax]
mov ecx, edi
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10040956
test dx, dx
je 0x10040952
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10040956
add eax, 4
add ecx, 4
test dx, dx
jne 0x10040930
xor eax, eax
jmp 0x1004095b
sbb eax, eax
or eax, 1
test eax, eax
je 0x10040982
lea ecx, [ebp - 0x48]
call fcn.1000df30
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x48]
call fcn.1000df50
test al, al
jne 0x10040920
jmp 0x10040986
mov byte [ebp - 0x4d], 1
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
dec ebx
cmp byte [ebp - 0x4d], 0
jne 0x100409bd
mov esi, dword [ebp - 0x4c]
push esi
call fcn.100429a1
push esi
push edi
push eax
mov dword [ebp - 0x74], eax
call fcn.100469b0
add esp, 0x10
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x58]
call fcn.1002b570
push edi
call fcn.10042a33
add esp, 4
inc ebx
cmp dword [ebp - 0x5c], 0x103
jne 0x10040862
cmp dword [ebp - 0x68], 0
je 0x10040a6c
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000deb0
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x48]
call fcn.1000df50
test al, al
je 0x10040a60
lea ecx, [ebp - 0x48]
call fcn.1000df10
mov ecx, dword [ebp - 0x68]
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10040a36
test dx, dx
je 0x10040a32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10040a36
add eax, 4
add ecx, 4
test dx, dx
jne 0x10040a10
xor eax, eax
jmp 0x10040a3b
sbb eax, eax
or eax, 1
test eax, eax
je 0x10040a6c
lea ecx, [ebp - 0x48]
call fcn.1000df30
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x48]
call fcn.1000df50
test al, al
jne 0x10040a03
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x58]
call fcn.1002b570
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x10040b10
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000deb0
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x4c]
call fcn.1000df50
test al, al
je 0x10040b10
lea esp, [esp]
lea ecx, [ebp - 0x4c]
call fcn.1000df10
mov eax, dword [eax]
mov ecx, ebx
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10040ad6
test dx, dx
je 0x10040ad2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10040ad6
add eax, 4
add ecx, 4
test dx, dx
jne 0x10040ab0
xor eax, eax
jmp 0x10040adb
sbb eax, eax
or eax, 1
lea ecx, [ebp - 0x4c]
test eax, eax
je 0x10040b02
call fcn.1000df30
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x4c]
call fcn.1000df50
test al, al
jne 0x10040aa0
jmp 0x10040b10
call fcn.1000df10
push eax
lea ecx, [ebp - 0x58]
call fcn.10040d50
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x58]
mov esi, 1
call fcn.1000deb0
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x48]
call fcn.1000df50
test al, al
je 0x10040bf9
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x54]
add eax, 0x100
cmp esi, eax
jae 0x10040b85
push esi
lea eax, [ebp - 0x24]
push 0x1007d348
push eax
call fcn.10043d0a
add esp, 0xc
lea eax, [ebp - 0x24]
push 0
push 0
push 0
push 0
push eax
push dword [ebp - 0x60]
call ebx
cmp eax, 2
je 0x10040b85
mov eax, dword [ebp - 0x54]
inc esi
add eax, 0x100
cmp esi, eax
jb 0x10040b50
lea ecx, [ebp - 0x48]
call fcn.1000df10
mov edi, dword [eax]
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x10040b92
sub edi, ecx
lea ecx, [ebp - 0x48]
sar edi, 1
call fcn.1000df10
lea ecx, [edi*2 + 2]
push ecx
push dword [eax]
lea eax, [ebp - 0x24]
push 1
push 0
push eax
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, dword [ebp - 0x6c]
test edi, edi
cmove edi, eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x6c], edi
call fcn.1000df30
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x48]
call fcn.1000df50
test al, al
jne 0x10040b44
mov ebx, dword [ebp + 0xc]
jmp 0x10040bfc
mov edi, dword [ebp - 0x6c]
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000deb0
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x4c]
call fcn.1000df50
test al, al
je 0x10040c6f
lea ecx, [ebp - 0x4c]
call fcn.1000df10
mov eax, dword [eax]
cmp eax, dword [ebp - 0x68]
je 0x10040c4e
lea ecx, [ebp - 0x4c]
call fcn.1000df10
cmp dword [eax], ebx
je 0x10040c4e
lea ecx, [ebp - 0x4c]
call fcn.1000df10
push dword [eax]
call fcn.10042a33
add esp, 4
lea ecx, [ebp - 0x4c]
call fcn.1000df30
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call fcn.1000dee0
push eax
lea ecx, [ebp - 0x4c]
call fcn.1000df50
test al, al
jne 0x10040c21
push dword [ebp - 0x60]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 0x64]
call esi
movq xmm0, qword [0x1007d360]
mov eax, dword [ebp - 0x80]
movq qword [ebp - 0x34], xmm0
movq xmm0, qword [0x1007d368]
mov eax, dword [eax]
lea edx, [ebp - 0x44]
push edx
movq qword [ebp - 0x2c], xmm0
movq xmm0, qword [0x1007d350]
lea edx, [ebp - 0x34]
push edx
movq qword [ebp - 0x44], xmm0
movq xmm0, qword [0x1007d358]
push 1
movq qword [ebp - 0x3c], xmm0
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x1c]
test eax, eax
jne 0x10040cd6
test edi, edi
jne 0x10040cd6
mov bl, 1
jmp 0x10040cd8
xor bl, bl
lea ecx, [ebp - 0x58]
call fcn.1002b540
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100422b3
mov esp, ebp
pop ebp
ret 8