Function at 0x100319c0
Capabilities:
Create pipe
Create process on windows
Create reverse shell
Create two anonymous pipes
Get common file path
Terminate process
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x14], ebx
cmp dword [ebx], 0
jne 0x10031cdc
push 0x104
lea eax, [ebp - 0x1fc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x1fc]
push 0x104
push eax
call fcn.1009e442
add esp, 8
cmp byte [ebp + eax - 0x1fd], 0x5c
je 0x10031a14
mov word [ebp + eax - 0x1fc], 0x5c
push 0x104
lea eax, [ebp - 0x304]
push eax
push dword [0x100db79c]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x304]
push 0
push eax
call fcn.1009d233
add esp, 8
test eax, eax
je 0x10031a4f
mov eax, 0x485
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x304]
push eax
lea eax, [ebp - 0x1fc]
push eax
lea eax, [ebp - 0x40c]
push str._srundll32.exe___s__DRM
push eax
call fcn.1009d293
push 0x400
lea eax, [ebp - 0x80c]
push 0
push eax
call fcn.100a1230
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x80c]
add esp, 0x1c
sub edx, ecx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x10031a90
mov edi, dword [sym.imp.KERNEL32.dll_CreatePipe]
lea eax, [ebp - 0x34]
push 0x19000
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x34], 0xc
push eax
add ebx, 0x94
mov dword [ebp - 0x2c], 1
push ebx
mov dword [ebp - 0x30], 0
call edi
mov esi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0
push 1
push dword [ebx]
call esi
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x34]
push 0x5000
add eax, 0x90
push ecx
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0x10]
push eax
call edi
mov edi, dword [ebp + 8]
push 0
push 1
push dword [edi]
call esi
xor eax, eax
push 0x44
push eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x84]
push eax
call fcn.100a1230
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0x84], 0x44
push eax
push 0
push 0
push 0x1000000
push 1
push 0
push 0
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x44], 0
push eax
push 0
mov dword [ebp - 0x58], 0x180
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x10031ba0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], eax
call esi
push dword [edi]
call esi
push dword [ebp - 0xc]
call esi
push dword [ebx]
call esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x100db798]
test eax, eax
jne 0x10031bed
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateJobObjectA]
mov esi, eax
lea eax, [ebp - 0xf4]
push 0x70
push 0
push eax
mov dword [0x100db798], esi
call fcn.100a1230
add esp, 0xc
mov dword [ebp - 0xe4], 0x2000
lea eax, [ebp - 0xf4]
push 0x70
push eax
push 9
push esi
call dword [sym.imp.KERNEL32.dll_SetInformationJobObject]
mov eax, dword [0x100db798]
push dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xc]
call esi
push dword [ebp - 0x20]
call esi
push 0
lea eax, [ebp - 0x38]
push eax
push 0x400
lea eax, [ebp - 0x80c]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10031c35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x10031c78
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
lea ecx, [ecx]
push 0
lea eax, [ebp - 0x28]
push eax
push 0
push 0
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x10031c5e
cmp dword [ebp - 0x28], 4
jae 0x10031caa
push 0xa
call edi
inc esi
cmp esi, 0x1f4
jl 0x10031c40
mov dword [ebp - 8], 0x5b4
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0xffffffffffffffff
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x24]
call esi
push dword [ebx]
call esi
mov eax, dword [ebp + 8]
push dword [eax]
call esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp esi, 0x1f4
jge 0x10031c6b
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 8]
push 4
push eax
mov ecx, esi
call fcn.10031560
test al, al
jne 0x10031cd1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x10031c72
cmp dword [ebp - 8], 0
jne 0x10031c72
mov eax, dword [ebp - 0x24]
mov dword [esi], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4