Function at 0x10065e4
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x1012d80]
push 0x103
push 0x1012e38
push dword [0x10131d0]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1006428
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100690a
push ebx
xor ebx, ebx
push esi
mov word [0x101303e], bx
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0xc0], 0x10013c4
mov dword [ebp - 0xb4], ebx
push edi
mov eax, dword [ebp - 0xc0]
push dword [eax]
mov esi, 0x1011050
push 0x1001880
push 0x28
push 0x1013180
call fcn.01005a9e
add esp, 0x10
cmp eax, ebx
jl 0x1006907
mov ecx, dword [ebp - 0xb4]
mov ecx, dword [ecx + 0x1011178]
cmp ecx, ebx
je 0x1006490
push ecx
push 0x28
push 0x1012d98
call fcn.010041e5
cmp eax, ebx
jl 0x1006907
mov eax, dword [ebp - 0xb4]
push dword [eax + 0x101117c]
push reloc.ADVAPI32.dll_ControlService
push 0x1013040
call fcn.010041e5
cmp eax, ebx
jl 0x1006907
cmp dword [0x1011050], ebx
je 0x1006599
lea ecx, [esi + 4]
cmp dword [ecx], ebx
je 0x1006591
cmp dword [esi + 8], ebx
je 0x1006591
mov eax, dword [esi]
mov esi, ecx
mov ecx, dword [esi]
push ecx
push eax
lea eax, [ebp - 0xa4]
push 0x50
push eax
add esi, 4
call fcn.01005a9e
add esp, 0x10
cmp eax, ebx
jl 0x1006907
push ebx
lea eax, [ebp - 0xc8]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
lea eax, [ebp - 0xa4]
push eax
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1006546
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [esi]
push 1
push ebx
push ebx
push dword [ebp - 0xc8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x100654c
inc dword [ebp - 0xa8]
add esi, 4
mov eax, dword [esi]
cmp eax, ebx
je 0x1006582
add eax, 2
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [esi + 4]
push 1
push ebx
push dword [esi]
push dword [ebp - 0xc8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1006582
inc dword [ebp - 0xa8]
push dword [ebp - 0xc8]
add esi, 8
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi], ebx
jne 0x10064c4
cmp dword [0x10131e0], ebx
je 0x10067f3
push ebx
lea eax, [ebp - 0xb0]
push 1
push eax
mov dword [ebp - 0xb0], ebx
call fcn.01006234
add esp, 0xc
test eax, eax
jne 0x10067a6
mov dword [ebp - 0xb8], ebx
mov dword [ebp - 0xbc], ebx
mov dword [ebp - 0xac], 0x2001f
mov dword [ebp - 0xcc], ebx
xor esi, esi
call fcn.01005318
movzx eax, al
cmp eax, ebx
mov dword [ebp - 0xc4], eax
je 0x10065ff
mov dword [ebp - 0xac], 0x2011f
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xe4], 0xc
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xe0], eax
xor edi, edi
push esi
inc edi
push edi
lea ecx, [ebp - 0xd0]
call fcn.01005b05
cmp esi, ebx
je 0x1006635
mov dword [ebp - 0xcc], edi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push ebx
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp - 0xac]
mov edi, 0x80000002
push ebx
push ebx
push ebx
push reloc.KERNEL32.dll_GetVersionExW
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0xb0], eax
jne 0x10066a9
cmp dword [ebp - 0xc4], ebx
je 0x1006697
push ebx
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0xe4]
push eax
push 0x2001f
push ebx
push ebx
push ebx
push reloc.KERNEL32.dll_GetVersionExW
push edi
call esi
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], ebx
jne 0x10066a9
mov dword [ebp - 0xcc], 1
cmp dword [ebp - 0xd0], 2
je 0x10066be
push dword [ebp - 0xd0]
call fcn.010045a4
pop ecx
xor esi, esi
inc esi
cmp dword [ebp - 0xcc], ebx
je 0x100661b
cmp dword [ebp - 0xb0], ebx
jne 0x10067a6
push 0x5c
mov edi, 0x1012e38
push edi
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x100674d
cmp esi, edi
je 0x100674d
push edi
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp dword [ebp - 0xc4], ebx
lea eax, [eax + eax + 2]
push eax
push edi
push 1
push ebx
push 0x10017f0
jne 0x1006730
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1006729
inc dword [ebp - 0xa8]
mov word [esi], 0x5c
jmp 0x1006786
push dword [ebp - 0xbc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1006746
inc dword [ebp - 0xa8]
mov word [esi], 0x5c
jmp 0x1006753
inc dword [ebp - 0xa8]
cmp dword [ebp - 0xc4], ebx
je 0x1006786
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push edi
push 1
push ebx
push 0x10017d8
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1006786
inc dword [ebp - 0xa8]
push dword [ebp - 0xb8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
cmp dword [ebp - 0xbc], ebx
je 0x10067ac
push dword [ebp - 0xbc]
call esi
jmp 0x10067ac
inc dword [ebp - 0xa8]
call fcn.010053b5
test al, al
je 0x10067cb
push 0x1011140
call fcn.0100628a
neg al
pop ecx
sbb eax, eax
inc eax
add dword [ebp - 0xa8], eax
call fcn.010053b5
test al, al
jne 0x10067dd
call fcn.01005318
test al, al
je 0x10067f3
push 0x1011164
call fcn.0100628a
neg al
pop ecx
sbb eax, eax
inc eax
add dword [ebp - 0xa8], eax
xor esi, esi
lea eax, [ebp - 0xac]
inc esi
push eax
mov dword [ebp - 0xac], esi
call fcn.01004365
pop ecx
lea eax, [ebp - 0xd4]
push eax
push dword [ebp - 0xac]
push ebx
push reloc.KERNEL32.dll_GetVersionExW
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10068d3
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xd8]
push eax
push ebx
push ebx
push reloc.KERNEL32.dll_GetVersionExW
push dword [ebp - 0xd4]
mov dword [ebp - 0xac], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10068c7
cmp dword [ebp - 0xd8], esi
jne 0x10068c7
push 0x11
pop ecx
lea edi, [ebp - 0x138]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0x138]
push eax
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
push ebx
push 0x1001774
mov dword [ebp - 0x138], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x10068c7
push 0xffffffffffffffff
push dword [ebp - 0xf4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0xf4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xf0]
call esi
push dword [ebp - 0xd4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add dword [ebp - 0xc0], 0x10
add dword [ebp - 0xb4], 4
cmp dword [ebp - 0xc0], 0x10013d4
jl 0x100644a
cmp dword [ebp - 0xa8], ebx
je 0x1006900
mov eax, 0x80040201
jmp 0x1006907
call fcn.01005225
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
call fcn.0100f1d6
leave
ret