Function at 0x100012e5
Capabilities:
Check for time delay via gettickcount
Check os version
Copy file
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create two anonymous pipes
Delete file
Get common file path
Read file on windows
Read file via mapping
Read pipe
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x4cc
push ebx
push esi
push edi
xor eax, eax
push 0xfe
mov word [ebp - 0x13c], ax
xor ebx, ebx
lea eax, [ebp - 0x13a]
push ebx
push eax
call fcn.10001a8b
add esp, 0xc
call fcn.1000100f
test eax, eax
jne 0x1000146f
push 0x104
lea eax, [ebp - 0x458]
push eax
push dword [0x10003c08]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, eax
mov eax, dword [0x10003c10]
inc edi
inc edi
add eax, edi
lea eax, [eax + eax + 4]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push 0x22
pop eax
mov word [esi], ax
lea eax, [esi + 2]
mov dword [ebp + 0x50], esi
lea edi, [ebp + edi*2 - 0x45c]
mov dword [ebp + 0x68], eax
cmp word [edi], 0x5c
je 0x10001388
push edi
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.USER32.dll_CharPrevW]
mov edi, eax
lea eax, [ebp - 0x458]
cmp edi, eax
ja 0x10001368
lea eax, [ebp - 0x458]
cmp edi, eax
jne 0x100013a8
push str.error
call fcn.10001af6
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x100019fc
push dword [ebp + 0x68]
xor eax, eax
push ebx
mov word [edi], ax
push 0x10002164
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0x5c
pop eax
push ebx
push dword [ebp + 0x68]
mov word [edi], ax
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x1000144c
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push ebx
push ebx
push 4
push ebx
push eax
mov dword [ebp + 0x5c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push ebx
push ebx
push ebx
mov edi, eax
push 2
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
je 0x1000143e
mov ecx, dword [eax + 0x3c]
add ecx, eax
mov edx, 0x10e
mov word [ecx + 0x16], dx
push 3
pop edx
mov word [ecx + 0x5c], dx
mov edx, entry0
sub edx, dword [0x10003c08]
push eax
mov dword [ecx + 0x28], edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp + 0x5c]
call edi
push 0x10002160
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [esi + eax*2]
push 0x20
pop eax
mov word [edi], ax
inc edi
inc edi
mov dword [ebp + 0x5c], edi
jmp 0x1000148e
mov eax, dword [0x10003c10]
lea eax, [eax + eax + 2]
push eax
push 0x40
mov dword [ebp + 0x68], ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
mov dword [ebp + 0x50], esi
mov edi, esi
mov dword [ebp + 0x5c], esi
mov eax, dword [0x10003c04]
mov dword [ebp + 0x40], ebx
mov dword [ebp + 0x54], ebx
mov dword [0x10003c00], ebx
cmp eax, ebx
je 0x100014c4
push ebx
push str.SysListView32
push ebx
push ebx
push str.32770
push ebx
push eax
call dword [sym.imp.USER32.dll_FindWindowExW]
push eax
call dword [sym.imp.USER32.dll_FindWindowExW]
mov dword [0x10003c00], eax
push edi
call fcn.10001abb
push str._TIMEOUT
push edi
call fcn.100010fc
pop ecx
pop ecx
cmp eax, edi
jne 0x100014ef
lea eax, [edi + 0x12]
push eax
call fcn.10001164
pop ecx
mov dword [ebp + 0x40], eax
xor eax, eax
mov word [edi], ax
jmp 0x100014c4
push 0x10002114
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x10001508
mov dword [ebp + 0x54], 1
jmp 0x100014e8
cmp word [edi], bx
jne 0x1000153b
push str.error
call fcn.10001af6
lea eax, [edi - 4]
cmp eax, esi
jb 0x10001524
xor eax, eax
mov word [edi - 4], ax
cmp dword [ebp + 0x68], ebx
je 0x1000139c
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x1000139c
push 0x40
lea eax, [ebp - 0x38]
push ebx
push eax
mov dword [ebp - 0x3c], 0x44
call fcn.10001a8b
xor eax, eax
mov dword [ebp + 0x2c], 0xc
lea edi, [ebp + 0x30]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov byte [ebp + 8], bl
lea edi, [ebp + 9]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov dword [ebp + 0x1c], ebx
lea edi, [ebp + 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x110
stosd dword es:[edi], eax
lea eax, [ebp - 0x24c]
push ebx
push eax
mov dword [ebp - 0x250], 0x114
call fcn.10001a8b
xor edi, edi
inc edi
add esp, 0x18
mov dword [ebp + 0x44], ebx
mov dword [ebp + 0x60], ebx
mov dword [ebp + 0x48], ebx
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x64], edi
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x58], 0x102
mov dword [ebp + 0x6c], ebx
mov dword [ebp + 0x70], ebx
cmp dword [ebp + 0x7c], ebx
je 0x100015ee
test byte [ebp + 0x7c], 2
je 0x100015cb
mov eax, dword [0x10003c10]
add eax, eax
jmp 0x100015d0
mov eax, 0x2000
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp + 0x6c], eax
cmp eax, ebx
je 0x1000191a
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp + 0x70], eax
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x240], 2
jne 0x10001624
push edi
lea eax, [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebx
push ebx
push edi
lea eax, [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp + 8]
mov dword [ebp + 0x30], eax
jmp 0x10001627
mov dword [ebp + 0x30], ebx
push ebx
lea eax, [ebp + 0x2c]
push eax
lea eax, [ebp + 0x44]
push eax
lea eax, [ebp + 0x60]
push eax
mov dword [ebp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x1000191a
push ebx
lea eax, [ebp + 0x2c]
push eax
lea eax, [ebp + 0x48]
push eax
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x1000191a
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
xor eax, eax
mov word [ebp - 0xc], ax
mov eax, dword [ebp + 0x48]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x44]
mov dword [ebp], eax
mov dword [ebp + 4], eax
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x3c]
push eax
push ebx
push ebx
push 0x10
push edi
push ebx
push ebx
push esi
push ebx
mov dword [ebp - 0x10], 0x101
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1000191a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp + 0x3c], eax
mov esi, section..data
cmp dword [ebp + 0x58], ebx
jne 0x100016c1
cmp dword [ebp + 0x64], ebx
je 0x1000192c
push ebx
lea eax, [ebp + 0x64]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [ebp + 0x64], ebx
je 0x100018ad
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebx
mov dword [ebp + 0x3c], eax
lea eax, [ebp + 0x64]
push eax
push 0x3ff
mov edi, 0x10003800
push edi
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0x64]
push 0x400
push esi
push eax
push edi
mov byte [eax + 0x10003800], bl
call fcn.1000104c
add esp, 0x10
cmp dword [ebp + 0x7c], ebx
je 0x100018ea
push dword [ebp + 0x70]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call edi
push esi
mov dword [ebp + 0x58], eax
call edi
mov ecx, dword [ebp + 0x58]
push dword [ebp + 0x6c]
lea edi, [ecx + eax + 1]
call dword [sym.imp.KERNEL32.dll_GlobalSize]
lea ecx, [edi + edi]
cmp eax, ecx
jae 0x10001786
cmp edi, dword [0x10003c10]
jb 0x10001755
test byte [ebp + 0x7c], 2
jne 0x10001786
push dword [ebp + 0x6c]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 0x42
lea eax, [edi + edi + 0x800]
push eax
push dword [ebp + 0x6c]
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
mov dword [ebp + 0x6c], eax
cmp eax, ebx
je 0x1000191a
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp + 0x70], eax
cmp edi, dword [0x10003c10]
jb 0x100017bb
test byte [ebp + 0x7c], 2
je 0x100017bb
push dword [ebp + 0x70]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call edi
mov ecx, dword [0x10003c10]
sub ecx, eax
push ecx
push esi
mov esi, dword [ebp + 0x70]
push esi
call edi
lea eax, [esi + eax*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x100017c5
push esi
push dword [ebp + 0x70]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
test byte [ebp + 0x7c], 2
jne 0x100018ea
push 0x10002110
push dword [ebp + 0x70]
jmp 0x10001836
push dword [ebp + 0x6c]
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov ecx, edi
sub ecx, dword [ebp + 0x70]
shr eax, 1
sub eax, 0x12
sar ecx, 1
cmp ecx, eax
jle 0x100017fc
push 0x20
pop eax
mov word [edi], ax
inc edi
inc edi
jmp 0x10001830
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [edi + eax*2 + 0x22]
lea edx, [edi + eax*2]
jmp 0x10001817
mov si, word [edx]
dec eax
mov word [ecx], si
dec ecx
dec ecx
dec edx
dec edx
cmp eax, ebx
jg 0x1000180c
push str.
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x20
add edi, 0x22
pop eax
mov word [edi], ax
push 0x10002110
push edi
call fcn.100010fc
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
jne 0x100017d9
mov esi, dword [ebp + 0x70]
mov edi, esi
cmp word [esi], bx
je 0x100018ea
movzx eax, word [edi]
cmp ax, 0xd
jne 0x10001863
xor eax, eax
mov word [edi], ax
inc edi
inc edi
jmp 0x10001888
cmp ax, 0xa
jne 0x1000187f
push dword [ebp + 0x54]
xor eax, eax
push esi
mov word [edi], ax
call fcn.1000108d
inc edi
pop ecx
inc edi
pop ecx
mov esi, edi
jmp 0x10001888
push edi
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
cmp word [edi], bx
jne 0x10001851
cmp esi, dword [ebp + 0x70]
je 0x100018ea
mov ecx, dword [ebp + 0x70]
jmp 0x1000189e
mov word [ecx], ax
inc ecx
inc ecx
inc esi
inc esi
movzx eax, word [esi]
cmp ax, bx
jne 0x10001897
xor eax, eax
mov word [ecx], ax
jmp 0x100018ea
mov esi, dword [ebp + 0x40]
cmp esi, ebx
je 0x100018e2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp + 0x3c]
add ecx, esi
cmp eax, ecx
jbe 0x100018e2
push 0xffffffffffffffff
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push str.timeout
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x100018ea
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp + 0x58], eax
lea eax, [ebp + 0x4c]
push eax
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push ebx
lea eax, [ebp + 0x64]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
jmp 0x100016ae
push str.error
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
test byte [ebp + 0x7c], 2
je 0x1000193a
push dword [ebp + 0x70]
call fcn.10001af6
test byte [ebp + 0x7c], 1
je 0x10001953
mov eax, dword [ebp + 0x70]
cmp word [eax], bx
je 0x10001953
push dword [ebp + 0x54]
push eax
call fcn.1000108d
pop ecx
pop ecx
cmp dword [ebp + 0x4c], 0xc000001d
jne 0x1000196e
push str.error
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp word [ebp - 0x13c], bx
jne 0x1000198f
push dword [ebp + 0x4c]
lea eax, [ebp - 0x13c]
push 0x100020e4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x13c]
push eax
call fcn.10001af6
push dword [ebp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 0x1c]
call esi
push dword [ebp + 0x44]
call esi
push dword [ebp + 0x60]
call esi
push dword [ebp + 0x48]
call esi
push dword [ebp + 0x38]
call esi
mov eax, dword [ebp + 0x5c]
lea ecx, [eax - 4]
cmp ecx, dword [ebp + 0x50]
jb 0x100019d0
xor ecx, ecx
mov word [eax - 4], cx
cmp dword [ebp + 0x68], ebx
je 0x100019de
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp + 0x50]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call esi
cmp dword [ebp + 0x7c], ebx
je 0x100019fc
push dword [ebp + 0x6c]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp + 0x6c]
call esi
pop edi
pop esi
pop ebx
add ebp, 0x74
leave
ret