Function at 0x100b7ae
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, 0x748
cmp dword [ebp + 8], 4
mov eax, dword [0x101200c]
mov dword [ebp - 4], eax
jne 0x100bbb6
push ebx
lea eax, [ebp - 0x69c]
push eax
push 1
xor ebx, ebx
push ebx
push 0x1001f20
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100bbb5
lea eax, [ebp - 0x680]
push eax
lea eax, [ebp - 0x32c]
push eax
lea eax, [ebp - 0x6a4]
push eax
push ebx
push 0x10023d4
push dword [ebp - 0x69c]
mov dword [ebp - 0x680], 0x104
mov byte [ebp - 0x228], bl
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100bba9
push edi
push 0x41
pop ecx
lea edi, [ebp - 0x434]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
push 0x105
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x32c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp dword [ebp + 0xc], ebx
jle 0x100bba8
cmp dword [ebp + 0xc], 2
push esi
mov esi, 0x21d
jle 0x100b899
cmp dword [ebp + 0xc], 3
jne 0x100bba7
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x688], eax
mov dword [ebp - 0x698], 0x1001f48
mov dword [ebp - 0x694], 0x10056fc
jmp 0x100ba5e
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x434]
push esi
push eax
mov dword [ebp - 0x688], eax
lea eax, [ebp - 0x224]
push eax
mov dword [ebp - 0x6a4], 1
mov dword [ebp - 0x698], 0x1001fec
mov dword [ebp - 0x694], 0x10056f4
call edi
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x680], eax
lea eax, [ebp + eax - 0x224]
push eax
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x5c
je 0x100b915
mov eax, dword [ebp - 0x680]
inc dword [ebp - 0x680]
mov byte [ebp + eax - 0x224], 0x5c
mov eax, dword [ebp - 0x680]
mov ecx, esi
sub ecx, eax
push ecx
push 0x1005a54
lea eax, [ebp + eax - 0x224]
push eax
call edi
add dword [ebp - 0x680], 5
mov eax, esi
sub eax, dword [ebp - 0x680]
push eax
mov eax, dword [ebp - 0x680]
push 0x1005918
lea eax, [ebp + eax - 0x224]
push eax
call edi
lea eax, [ebp - 0x67c]
push eax
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [ebp - 0x6a0], eax
mov eax, ecx
cmp eax, ebx
je 0x100ba5e
test dword [ebp - 0x67c], 0x10
jne 0x100ba37
mov eax, dword [ebp - 0x680]
mov ecx, esi
sub ecx, eax
push ecx
lea ecx, [ebp - 0x650]
push ecx
lea eax, [ebp + eax - 0x224]
push eax
call edi
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x68c], eax
je 0x100ba37
push ebx
lea ecx, [ebp - 0x684]
push ecx
push 0x50
lea ecx, [ebp - 0x748]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100ba2b
push ebx
push ebx
push ebx
push dword [ebp - 0x68c]
mov dword [ebp - 0x734], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
mov dword [ebp - 0x684], eax
lea eax, [ebp - 0x684]
push eax
push 0x50
lea eax, [ebp - 0x748]
push eax
push dword [ebp - 0x68c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x68c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x67c]
push eax
push dword [ebp - 0x6a0]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x100b980
push dword [ebp - 0x6a0]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
lea eax, [ebp - 0x224]
push eax
push ebx
mov dword [ebp - 0x684], 0x80004005
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
je 0x100bab8
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push 0x1004274
lea eax, [ebp - 0x224]
push eax
push 0x10024a4
lea eax, [ebp - 0x53c]
push 0x105
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x53c]
jmp 0x100babd
mov eax, 0x1004274
push dword [ebp - 0x688]
push dword [ebp - 0x694]
push eax
push 0x10056d0
lea eax, [ebp - 0x224]
push esi
push eax
call edi
add esp, 0x18
push 0x11
pop ecx
xor eax, eax
lea edi, [ebp - 0x6f8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x6b4]
push eax
lea eax, [ebp - 0x6f8]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x224]
push eax
push ebx
mov dword [ebp - 0x6f8], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x100bb50
push 0xffffffffffffffff
push dword [ebp - 0x6b4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x684]
push eax
push dword [ebp - 0x6b4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x6b0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x6b4]
call esi
lea eax, [ebp - 0x690]
push eax
push 2
push ebx
push dword [ebp - 0x698]
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100bba7
push dword [ebp - 0x688]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push dword [ebp - 0x688]
push dword [ebp - 0x6a4]
push ebx
push 0x10023d4
push dword [ebp - 0x690]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x690]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop edi
push dword [ebp - 0x69c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov ecx, dword [ebp - 4]
call fcn.0100d528
leave
ret 8