Function at 0x106a9cc
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 0x106ad1a
lea eax, [ebp - 0x638]
push eax
push ebx
push 0x100bfb0
lea eax, [ebp - 0x840]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x106ad1a
mov ecx, dword [ebp - 0xe5c]
lea eax, [ebp - 0x638]
push eax
push dword [ebp - 0xe60]
push edi
call fcn.0106a675
test eax, eax
je 0x106ad1a
lea eax, [ebp - 0xe74]
push eax
push edi
mov dword [ebp - 0xe74], ebx
call fcn.0106b562
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 0x106ad1a
push dword [ebp - 0xe74]
mov ecx, dword [ebp - 0xe5c]
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.0106a72c
test eax, eax
je 0x106ad1a
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x638]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x106ad1a
mov ecx, dword [ebp - 0xe5c]
call fcn.0106a987
test eax, eax
je 0x106aaf4
mov ecx, dword [ebp - 0xe5c]
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0xe60]
call fcn.0106a7af
test eax, eax
je 0x106ab24
push 1
lea eax, [ebp - 0x840]
push eax
push 0x100bcc0
lea eax, [ebp - 0x20c]
push eax
push 0x1008568
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 0x106ab42
push 4
push ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x106ad1a
push 0x111
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x106ad1a
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 0x100bf94
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 0x106ad1a
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 0x106ac4f
lea eax, [esi + esi]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
mov dword [ebp - 0xe5c], eax
je 0x106ac4f
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 0x106ac4f
cmp dword [ebp - 0xe64], ebx
je 0x106ac3a
push 0x100bf7c
push dword [ebp - 0xe5c]
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
cmp eax, ebx
je 0x106ac3a
sub eax, dword [ebp - 0xe5c]
push ebx
sar eax, 1
add eax, 0xa
push ebx
mov dword [ebp - 0xe68], eax
push eax
jmp 0x106ac3f
push 2
push ebx
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0xe68], 0xffffffff
jne 0x106ac65
push ebx
lea eax, [ebp - 0xe70]
push eax
push 0xa
push 0x100bf7c
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 5
pop ecx
push 0x7d
xor eax, eax
mov esi, 0x100bf68
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 0x106ad02
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 sub.msvcrt.dll_void___cdecl_operator_delete_void__
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.0105ec09
leave
ret 8