Function at 0x1009137
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 0x1009173
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1009668
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 0x1007f30
push 0x28
push 0x100f470
call fcn.01008f42
add esp, 0x10
cmp eax, edi
jl 0x1009666
mov ecx, dword [ebp - 0xb4]
mov ecx, dword [ecx + 0x100fdf4]
cmp ecx, edi
je 0x10091db
push ecx
push 0x28
push 0x100f420
call fcn.01008e5c
cmp eax, edi
jl 0x1009666
mov eax, dword [ebp - 0xb4]
push dword [eax + 0x100fdf8]
push 0x64
push 0x100f530
call fcn.01008e5c
cmp eax, edi
jl 0x1009666
cmp dword [0x100fcd0], edi
je 0x10092e4
lea ecx, [esi + 4]
cmp dword [ecx], edi
je 0x10092dc
cmp dword [esi + 8], edi
je 0x10092dc
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.01008f42
add esp, 0x10
cmp eax, edi
jl 0x1009666
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 0x1009291
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 0x1009297
inc dword [ebp - 0xa8]
add esi, 4
mov eax, dword [esi]
cmp eax, edi
je 0x10092cd
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 0x10092cd
inc dword [ebp - 0xa8]
push dword [ebp - 0xc8]
add esi, 8
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi], edi
jne 0x100920f
cmp dword [0x100fe54], edi
je 0x100954d
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 0x10094fc
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.01008881
movzx eax, al
mov dword [ebp - 0xc4], eax
cmp eax, edi
je 0x1009351
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.01008fa1
cmp esi, edi
je 0x1009389
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 0x1009400
cmp dword [ebp - 0xc4], edi
je 0x10093ee
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 0x1009400
mov dword [ebp - 0xcc], 1
cmp dword [ebp - 0xd0], 2
je 0x1009415
push dword [ebp - 0xd0]
call fcn.010021cd
pop ecx
xor esi, esi
inc esi
cmp dword [ebp - 0xcc], edi
je 0x100936d
cmp dword [ebp - 0xb0], edi
jne 0x10094fc
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov esi, eax
pop ecx
pop ecx
cmp esi, edi
je 0x10094a3
cmp esi, ebx
je 0x10094a3
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 0x1007f0c
cmp dword [ebp - 0xc4], edi
jne 0x1009485
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x100947d
inc dword [ebp - 0xa8]
push 0x5c
pop eax
mov word [esi], ax
jmp 0x10094dc
push dword [ebp - 0xbc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x100949b
inc dword [ebp - 0xa8]
push 0x5c
pop eax
mov word [esi], ax
jmp 0x10094a9
inc dword [ebp - 0xa8]
cmp dword [ebp - 0xc4], edi
je 0x10094dc
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push edi
push 0x1007ef4
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10094dc
inc dword [ebp - 0xa8]
push dword [ebp - 0xb8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
cmp dword [ebp - 0xbc], edi
je 0x1009502
push dword [ebp - 0xbc]
call esi
jmp 0x1009502
inc dword [ebp - 0xa8]
call fcn.01008922
test al, al
je 0x1009523
push 0x100fd24
call fcn.01008fc9
pop ecx
xor ecx, ecx
test al, al
sete cl
add dword [ebp - 0xa8], ecx
call fcn.01008922
test al, al
jne 0x1009535
call fcn.01008881
test al, al
je 0x100954d
push 0x100fde0
call fcn.01008fc9
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 0x10096c0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1009632
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xd8]
push eax
push edi
push edi
push 0x1009694
push dword [ebp - 0xd4]
mov dword [ebp - 0xac], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1009626
cmp dword [ebp - 0xd8], esi
jne 0x1009626
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 0x1009678
mov dword [ebp - 0x138], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1009626
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 0x1009195
cmp dword [ebp - 0xa8], edi
je 0x100965f
mov eax, 0x80040201
jmp 0x1009666
call fcn.0100872c
xor eax, eax
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01001d10
leave
ret