Function at 0x1009147
Capabilities:
Create process on windows
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x100e00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0x103
mov ebx, 0x100f9f8
push ebx
push dword [0x100e014]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1009183
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1009678
push edi
xor eax, eax
xor edi, edi
mov word [0x100fbfe], ax
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0xc0], 0x10020a0
mov dword [ebp - 0xb4], edi
push esi
mov eax, dword [ebp - 0xc0]
push dword [eax]
mov esi, 0x100fcd0
push 0x1007f40
push 0x28
push 0x100f470
call fcn.01008f52
add esp, 0x10
cmp eax, edi
jl 0x1009676
mov ecx, dword [ebp - 0xb4]
mov ecx, dword [ecx + 0x100fdf4]
cmp ecx, edi
je 0x10091eb
push ecx
push 0x28
push 0x100f420
call fcn.01008e6c
cmp eax, edi
jl 0x1009676
mov eax, dword [ebp - 0xb4]
push dword [eax + 0x100fdf8]
push 0x64
push 0x100f530
call fcn.01008e6c
cmp eax, edi
jl 0x1009676
cmp dword [0x100fcd0], edi
je 0x10092f4
lea ecx, [esi + 4]
cmp dword [ecx], edi
je 0x10092ec
cmp dword [esi + 8], edi
je 0x10092ec
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.01008f52
add esp, 0x10
cmp eax, edi
jl 0x1009676
push edi
lea eax, [ebp - 0xc8]
push eax
push edi
push 0x2001f
push edi
push edi
push edi
lea eax, [ebp - 0xa4]
push eax
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x10092a1
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [esi]
push 1
push edi
push edi
push dword [ebp - 0xc8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10092a7
inc dword [ebp - 0xa8]
add esi, 4
mov eax, dword [esi]
cmp eax, edi
je 0x10092dd
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 edi
push dword [esi]
push dword [ebp - 0xc8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10092dd
inc dword [ebp - 0xa8]
push dword [ebp - 0xc8]
add esi, 8
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi], edi
jne 0x100921f
cmp dword [0x100fe54], edi
je 0x100955d
push edi
push 1
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xb0]
push eax
mov dword [ebp - 0xb0], edi
call fcn.010025f2
add esp, 0x10
test eax, eax
jne 0x100950c
mov dword [ebp - 0xb8], edi
mov dword [ebp - 0xbc], edi
mov dword [ebp - 0xac], 0x2001f
mov dword [ebp - 0xcc], edi
xor esi, esi
call fcn.01008891
movzx eax, al
mov dword [ebp - 0xc4], eax
cmp eax, edi
je 0x1009361
mov dword [ebp - 0xac], 0x2011f
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xe4], 0xc
mov dword [ebp - 0xdc], edi
mov dword [ebp - 0xe0], eax
push esi
push 1
lea ecx, [ebp - 0xd0]
call fcn.01008fb1
cmp esi, edi
je 0x1009399
mov dword [ebp - 0xcc], 1
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push edi
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp - 0xac]
push edi
push edi
push edi
push 0x10020e0
push 0x80000002
call esi
mov dword [ebp - 0xb0], eax
cmp eax, edi
jne 0x1009410
cmp dword [ebp - 0xc4], edi
je 0x10093fe
push edi
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0xe4]
push eax
push 0x2001f
push edi
push edi
push edi
push 0x10020e0
push 0x80000002
call esi
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], edi
jne 0x1009410
mov dword [ebp - 0xcc], 1
cmp dword [ebp - 0xd0], 2
je 0x1009425
push dword [ebp - 0xd0]
call fcn.010021dd
pop ecx
xor esi, esi
inc esi
cmp dword [ebp - 0xcc], edi
je 0x100937d
cmp dword [ebp - 0xb0], edi
jne 0x100950c
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov esi, eax
pop ecx
pop ecx
cmp esi, edi
je 0x10094b3
cmp esi, ebx
je 0x10094b3
xor eax, eax
push ebx
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push edi
push 0x1007f1c
cmp dword [ebp - 0xc4], edi
jne 0x1009495
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x100948d
inc dword [ebp - 0xa8]
push 0x5c
pop eax
mov word [esi], ax
jmp 0x10094ec
push dword [ebp - 0xbc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10094ab
inc dword [ebp - 0xa8]
push 0x5c
pop eax
mov word [esi], ax
jmp 0x10094b9
inc dword [ebp - 0xa8]
cmp dword [ebp - 0xc4], edi
je 0x10094ec
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push edi
push 0x1007f04
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10094ec
inc dword [ebp - 0xa8]
push dword [ebp - 0xb8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
cmp dword [ebp - 0xbc], edi
je 0x1009512
push dword [ebp - 0xbc]
call esi
jmp 0x1009512
inc dword [ebp - 0xa8]
call fcn.01008932
test al, al
je 0x1009533
push 0x100fd24
call fcn.01008fd9
pop ecx
xor ecx, ecx
test al, al
sete cl
add dword [ebp - 0xa8], ecx
call fcn.01008932
test al, al
jne 0x1009545
call fcn.01008891
test al, al
je 0x100955d
push 0x100fde0
call fcn.01008fd9
pop ecx
xor ecx, ecx
test al, al
sete cl
add dword [ebp - 0xa8], ecx
xor esi, esi
lea eax, [ebp - 0xac]
inc esi
push eax
mov dword [ebp - 0xac], esi
call fcn.01004293
pop ecx
lea eax, [ebp - 0xd4]
push eax
push dword [ebp - 0xac]
push edi
push 0x10096d0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1009642
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xd8]
push eax
push edi
push edi
push 0x10096a4
push dword [ebp - 0xd4]
mov dword [ebp - 0xac], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1009636
cmp dword [ebp - 0xd8], esi
jne 0x1009636
push 0x44
pop esi
push esi
lea eax, [ebp - 0x138]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0x138]
push eax
push edi
push edi
push 0x8000000
push edi
push edi
push edi
push edi
push 0x1009688
mov dword [ebp - 0x138], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1009636
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], 0x10020b0
jl 0x10091a5
cmp dword [ebp - 0xa8], edi
je 0x100966f
mov eax, 0x80040201
jmp 0x1009676
call fcn.0100873c
xor eax, eax
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01001d20
leave
ret