Function at 0x100b2ff
Capabilities:
Create process on windows
Enumerate files on windows
Query environment variable
Query or enumerate registry value
Read file on windows
Set registry value
Write and execute a file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x738
cmp dword [ebp + 8], 4
mov eax, dword [0x101203c]
mov dword [ebp - 4], eax
jne 0x100b6fd
push ebx
lea eax, [ebp - 0x68c]
push eax
push 1
xor ebx, ebx
push ebx
push 0x1001f50
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100b6fc
push esi
lea eax, [ebp - 0x670]
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x694]
push eax
push ebx
push 0x10023ac
push dword [ebp - 0x68c]
mov esi, 0x104
mov dword [ebp - 0x670], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100b6ef
push edi
push 0x41
pop ecx
lea edi, [ebp - 0x324]
rep stosd dword es:[edi], eax
push esi
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp dword [ebp + 0xc], ebx
jle 0x100b6ee
cmp dword [ebp + 0xc], 2
mov esi, 0x21c
jle 0x100b3e0
cmp dword [ebp + 0xc], 3
jne 0x100b6ee
lea eax, [ebp - 0x428]
mov dword [ebp - 0x678], eax
mov dword [ebp - 0x688], 0x1001f78
mov dword [ebp - 0x684], 0x10056f0
jmp 0x100b5a5
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x324]
push esi
push eax
mov dword [ebp - 0x678], eax
lea eax, [ebp - 0x220]
push eax
mov dword [ebp - 0x694], 1
mov dword [ebp - 0x688], 0x100201c
mov dword [ebp - 0x684], 0x10056e8
call edi
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x670], eax
lea eax, [ebp + eax - 0x220]
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x5c
je 0x100b45c
mov eax, dword [ebp - 0x670]
inc dword [ebp - 0x670]
mov byte [ebp + eax - 0x220], 0x5c
mov eax, dword [ebp - 0x670]
mov ecx, esi
sub ecx, eax
push ecx
push 0x1005a48
lea eax, [ebp + eax - 0x220]
push eax
call edi
add dword [ebp - 0x670], 5
mov eax, esi
sub eax, dword [ebp - 0x670]
push eax
mov eax, dword [ebp - 0x670]
push 0x100590c
lea eax, [ebp + eax - 0x220]
push eax
call edi
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [ebp - 0x690], eax
mov eax, ecx
cmp eax, ebx
je 0x100b5a5
test dword [ebp - 0x66c], 0x10
jne 0x100b57e
mov eax, dword [ebp - 0x670]
mov ecx, esi
sub ecx, eax
push ecx
lea ecx, [ebp - 0x640]
push ecx
lea eax, [ebp + eax - 0x220]
push eax
call edi
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x67c], eax
je 0x100b57e
push ebx
lea ecx, [ebp - 0x674]
push ecx
push 0x50
lea ecx, [ebp - 0x738]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100b572
push ebx
push ebx
push ebx
push dword [ebp - 0x67c]
mov dword [ebp - 0x724], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
mov dword [ebp - 0x674], eax
lea eax, [ebp - 0x674]
push eax
push 0x50
lea eax, [ebp - 0x738]
push eax
push dword [ebp - 0x67c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x67c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x66c]
push eax
push dword [ebp - 0x690]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x100b4c7
push dword [ebp - 0x690]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
lea eax, [ebp - 0x220]
push eax
push ebx
mov dword [ebp - 0x674], 0x80004005
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
je 0x100b5ff
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push 0x100424c
lea eax, [ebp - 0x220]
push eax
push 0x100247c
lea eax, [ebp - 0x52c]
push 0x104
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x52c]
jmp 0x100b604
mov eax, 0x100424c
push dword [ebp - 0x678]
push dword [ebp - 0x684]
push eax
push 0x10056c4
lea eax, [ebp - 0x220]
push esi
push eax
call edi
add esp, 0x18
push 0x11
pop ecx
xor eax, eax
lea edi, [ebp - 0x6e8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x6a4]
push eax
lea eax, [ebp - 0x6e8]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x220]
push eax
push ebx
mov dword [ebp - 0x6e8], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x100b697
push 0xffffffffffffffff
push dword [ebp - 0x6a4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x674]
push eax
push dword [ebp - 0x6a4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x6a0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x6a4]
call esi
lea eax, [ebp - 0x680]
push eax
push 2
push ebx
push dword [ebp - 0x688]
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100b6ee
push dword [ebp - 0x678]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push dword [ebp - 0x678]
push dword [ebp - 0x694]
push ebx
push 0x10023ac
push dword [ebp - 0x680]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x680]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
push dword [ebp - 0x68c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
call fcn.0100d058
leave
ret 8