Function at 0x1009107
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 0x1009143
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x1009638
push edi
xor eax, eax
xor edi, edi
mov word [0x100fbfe], ax
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0xc0], 0x1002090
mov dword [ebp - 0xb4], edi
push esi
mov eax, dword [ebp - 0xc0]
push dword [eax]
mov esi, 0x100fcd0
push 0x1007f00
push 0x28
push 0x100f470
call fcn.01008f12
add esp, 0x10
cmp eax, edi
jl 0x1009636
mov ecx, dword [ebp - 0xb4]
mov ecx, dword [ecx + 0x100fdf4]
cmp ecx, edi
je 0x10091ab
push ecx
push 0x28
push 0x100f420
call fcn.01008e2c
cmp eax, edi
jl 0x1009636
mov eax, dword [ebp - 0xb4]
push dword [eax + 0x100fdf8]
push 0x64
push 0x100f530
call fcn.01008e2c
cmp eax, edi
jl 0x1009636
cmp dword [0x100fcd0], edi
je 0x10092b4
lea ecx, [esi + 4]
cmp dword [ecx], edi
je 0x10092ac
cmp dword [esi + 8], edi
je 0x10092ac
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.01008f12
add esp, 0x10
cmp eax, edi
jl 0x1009636
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 0x1009261
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 0x1009267
inc dword [ebp - 0xa8]
add esi, 4
mov eax, dword [esi]
cmp eax, edi
je 0x100929d
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 0x100929d
inc dword [ebp - 0xa8]
push dword [ebp - 0xc8]
add esi, 8
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi], edi
jne 0x10091df
cmp dword [0x100fe54], edi
je 0x100951d
push edi
push 1
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xb0]
push eax
mov dword [ebp - 0xb0], edi
call fcn.010025e2
add esp, 0x10
test eax, eax
jne 0x10094cc
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.01008851
movzx eax, al
mov dword [ebp - 0xc4], eax
cmp eax, edi
je 0x1009321
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.01008f71
cmp esi, edi
je 0x1009359
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 0x10020d0
push 0x80000002
call esi
mov dword [ebp - 0xb0], eax
cmp eax, edi
jne 0x10093d0
cmp dword [ebp - 0xc4], edi
je 0x10093be
push edi
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0xe4]
push eax
push 0x2001f
push edi
push edi
push edi
push 0x10020d0
push 0x80000002
call esi
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], edi
jne 0x10093d0
mov dword [ebp - 0xcc], 1
cmp dword [ebp - 0xd0], 2
je 0x10093e5
push dword [ebp - 0xd0]
call fcn.010021cd
pop ecx
xor esi, esi
inc esi
cmp dword [ebp - 0xcc], edi
je 0x100933d
cmp dword [ebp - 0xb0], edi
jne 0x10094cc
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov esi, eax
pop ecx
pop ecx
cmp esi, edi
je 0x1009473
cmp esi, ebx
je 0x1009473
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 0x1007edc
cmp dword [ebp - 0xc4], edi
jne 0x1009455
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x100944d
inc dword [ebp - 0xa8]
push 0x5c
pop eax
mov word [esi], ax
jmp 0x10094ac
push dword [ebp - 0xbc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x100946b
inc dword [ebp - 0xa8]
push 0x5c
pop eax
mov word [esi], ax
jmp 0x1009479
inc dword [ebp - 0xa8]
cmp dword [ebp - 0xc4], edi
je 0x10094ac
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push edi
push 0x1007ec4
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10094ac
inc dword [ebp - 0xa8]
push dword [ebp - 0xb8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
cmp dword [ebp - 0xbc], edi
je 0x10094d2
push dword [ebp - 0xbc]
call esi
jmp 0x10094d2
inc dword [ebp - 0xa8]
call fcn.010088f2
test al, al
je 0x10094f3
push 0x100fd24
call fcn.01008f99
pop ecx
xor ecx, ecx
test al, al
sete cl
add dword [ebp - 0xa8], ecx
call fcn.010088f2
test al, al
jne 0x1009505
call fcn.01008851
test al, al
je 0x100951d
push 0x100fde0
call fcn.01008f99
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.01004283
pop ecx
lea eax, [ebp - 0xd4]
push eax
push dword [ebp - 0xac]
push edi
push 0x1009690
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1009602
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xd8]
push eax
push edi
push edi
push 0x1009664
push dword [ebp - 0xd4]
mov dword [ebp - 0xac], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10095f6
cmp dword [ebp - 0xd8], esi
jne 0x10095f6
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 0x1009648
mov dword [ebp - 0x138], esi
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
test eax, eax
je 0x10095f6
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], 0x10020a0
jl 0x1009165
cmp dword [ebp - 0xa8], edi
je 0x100962f
mov eax, 0x80040201
jmp 0x1009636
call fcn.010086fc
xor eax, eax
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01001d10
leave
ret