Function at 0x106aa6c
Capabilities:
Create process on windows
Get common file path
Get file size
Move file
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xe74
mov eax, dword [0x111121c]
push ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xe60], eax
lea eax, [ebp - 0x840]
push eax
mov esi, 0x104
xor ebx, ebx
push esi
mov dword [ebp - 0xe5c], ecx
mov dword [ebp - 0xe6c], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x106adba
lea eax, [ebp - 0x638]
push eax
push ebx
push 0x100bfc0
lea eax, [ebp - 0x840]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x106adba
mov ecx, dword [ebp - 0xe5c]
lea eax, [ebp - 0x638]
push eax
push dword [ebp - 0xe60]
push edi
call fcn.0106a715
test eax, eax
je 0x106adba
lea eax, [ebp - 0xe74]
push eax
push edi
mov dword [ebp - 0xe74], ebx
call fcn.0106b602
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
push esi
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x106adba
push dword [ebp - 0xe74]
mov ecx, dword [ebp - 0xe5c]
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.0106a7cc
test eax, eax
je 0x106adba
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x638]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x106adba
mov ecx, dword [ebp - 0xe5c]
call fcn.0106aa27
test eax, eax
je 0x106ab94
mov ecx, dword [ebp - 0xe5c]
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0xe60]
call fcn.0106a84f
test eax, eax
je 0x106abc4
push 1
lea eax, [ebp - 0x840]
push eax
push 0x100bcd0
lea eax, [ebp - 0x20c]
push eax
push 0x1008560
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x20
pop ecx
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [ebp - 0xe6c], eax
cmp dword [0x1112e38], 2
jne 0x106abe2
push 4
push ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x106adba
push 0x111
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x106adba
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x430]
push eax
call esi
mov ecx, 0x111
sub ecx, eax
push ecx
push 0x100bfa4
lea eax, [ebp - 0x430]
push eax
call esi
lea eax, [ebp + eax*2 - 0x430]
push eax
call edi
push ebx
push 0x80
push 4
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0xe60], edi
je 0x106adba
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
or dword [ebp - 0xe68], 0xffffffff
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0xe5c], ebx
mov dword [ebp - 0xe64], ebx
jbe 0x106acef
lea eax, [esi + esi]
push eax
call fcn.0105f04e
cmp eax, ebx
pop ecx
mov dword [ebp - 0xe5c], eax
je 0x106acef
push ebx
lea eax, [ebp - 0xe64]
push eax
push esi
push dword [ebp - 0xe5c]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x106acef
cmp dword [ebp - 0xe64], ebx
je 0x106acda
push 0x100bf8c
push dword [ebp - 0xe5c]
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
cmp eax, ebx
je 0x106acda
sub eax, dword [ebp - 0xe5c]
push ebx
sar eax, 1
add eax, 0xa
push ebx
mov dword [ebp - 0xe68], eax
push eax
jmp 0x106acdf
push 2
push ebx
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0xe68], 0xffffffff
jne 0x106ad05
push ebx
lea eax, [ebp - 0xe70]
push eax
push 0xa
push 0x100bf8c
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 5
pop ecx
push 0x7d
xor eax, eax
mov esi, 0x100bf78
lea edi, [ebp - 0xa48]
rep movsd dword es:[edi], dword [esi]
pop ecx
lea edi, [ebp - 0xa34]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0xa48]
push eax
lea eax, [ebp - 0xe58]
push 0x208
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x10
push ebx
lea eax, [ebp - 0xe70]
push eax
lea eax, [ebp - 0xe58]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
lea eax, [ebp - 0xe58]
push eax
push dword [ebp - 0xe60]
call esi
cmp dword [ebp - 0xe68], 0xffffffff
je 0x106ada2
mov ecx, dword [ebp - 0xe5c]
push ebx
lea eax, [ecx + 0x14]
lea edx, [ebp - 0xe70]
push edx
mov edx, eax
sub edx, ecx
mov ecx, dword [ebp - 0xe64]
sar edx, 1
sub ecx, edx
push ecx
push eax
push dword [ebp - 0xe60]
call esi
push dword [ebp - 0xe5c]
call fcn.0105eff6
pop ecx
push dword [ebp - 0xe60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xe6c]
pop edi
pop esi
pop ebx
call fcn.0105eca9
leave
ret 8