Function at 0x6104d850
Capabilities:
Create process on windows
Create process suspended
Resume thread
Terminate process

Disassembly:
push ebp
mov ecx, 4
mov ebp, esp
push edi
lea edi, [ebp - 0x28]
push esi
push ebx
xor ebx, ebx
sub esp, 0x4dc
cld
mov eax, ebx
mov esi, dword [ebp + 0x18]
rep stosd dword es:[edi], eax
call fcn.610a0450
call fcn.6108aba0
mov eax, dword [0x610eda80]
lea edi, [ebp - 0x78]
mov dword [esp], eax
call sub.KERNEL32.dll_GetPriorityClass
mov dword [ebp - 0x494], eax
mov ecx, 0x11
sub esp, 4
cld
mov eax, ebx
rep stosd dword es:[edi], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0x610ef788
mov dword [esp + 8], 2
mov dword [esp + 4], 0x40000000
mov dword [esp], 0x6104d61f
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x6104e320
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov eax, dword [0x610ed768]
add eax, 0x18c
mov ebx, dword [eax + 0x18]
test ebx, ebx
jle 0x6104d906
or dword [ebp - 0x494], 4
mov edx, dword [ebp + 8]
mov dword [edx], 0
mov eax, dword [0x610eda80]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp], eax
call sub.KERNEL32.dll_DuplicateHandle
sub esp, 0x1c
test eax, eax
je 0x6104e30f
mov eax, dword [ebp + 0xc]
mov edx, dword [0x610edafc]
mov ecx, dword [0x610edc44]
mov dword [eax], edx
xor eax, eax
test ecx, ecx
je 0x6104d970
mov edx, dword [0x610edc40]
test edx, edx
je 0x6104d970
mov al, 1
mov esi, esi
mov edx, dword [ebp + 0x10]
mov byte [edx], al
mov eax, dword fs:[4]
mov eax, dword [eax - 0xda8]
mov dword [esp], eax
call sym.cygwin1.dll__fflush
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x610ef794
call sub.KERNEL32.dll_CreateEventA
mov dword [ebp - 0x48c], eax
sub esp, 0x10
test eax, eax
je 0x6104e2f5
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x610ef794
call sub.KERNEL32.dll_CreateEventA
mov dword [ebp - 0x490], eax
sub esp, 0x10
test eax, eax
je 0x6104e2ab
mov dword [esp + 8], 1
mov edx, dword [ebp - 0x48c]
mov dword [esp + 4], esi
mov dword [esp], 2
mov dword [esp + 0xc], edx
call fcn.6108ac70
mov eax, dword [ebp - 0x490]
sub esp, 0x10
mov dword [esi + 0x44], eax
mov dword [esp], esi
call fcn.6104c510
mov dword [ebp - 0x78], 0x44
mov eax, dword [0x610ed768]
mov dword [ebp - 0x44], esi
mov word [ebp - 0x46], 0x124
add eax, 0x88
cmp dword [eax + 0xcc], 0xffffffff
jne 0x6104e2a1
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, dword [edx]
xor edx, edx
mov dword [esi + 0x2c], eax
lea eax, [ebp - 0x478]
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.61078f10
mov edi, dword [0x610f08a0]
sub esp, 8
mov ebx, eax
test edi, edi
jne 0x6104e250
mov eax, dword [0x610eefe0]
mov edx, 0xffffffff
call fcn.610907e0
mov eax, dword [0x610ed768]
xor edx, edx
add eax, 0x18c
cmp dword [eax + 0x18], 0
mov eax, esi
setg dl
movzx edx, dl
call fcn.61001fb0
mov dword [esp + 0xc], ebx
lea edx, [ebp - 0x28]
mov edi, eax
mov dword [esp + 0x24], edx
mov eax, dword [0x610ef740]
lea edx, [ebp - 0x78]
mov dword [esp + 0x20], edx
mov edx, dword [ebp - 0x494]
add eax, 0x1c
mov dword [esp + 8], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 1
mov dword [esp + 4], eax
mov dword [esp], eax
call sub.KERNEL32.dll_CreateProcessA
mov edx, dword [ebp + 8]
mov ebx, eax
sub esp, 0x28
mov eax, dword [edx]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
test ebx, ebx
je 0x6104e191
mov edx, dword [0x610ed768]
add edx, 0x18c
mov ecx, dword [edx + 0x18]
test ecx, ecx
jg 0x6104e161
xor ecx, ecx
mov edx, esi
mov eax, edi
call fcn.610020b0
mov eax, dword [0x61148914]
lea edi, [ebp - 0x488]
mov ecx, dword [ebp - 0x20]
movzx eax, byte [eax + 0xf]
mov edx, ecx
shr al, 1
and eax, 1
test al, al
je 0x6104db61
neg edx
mov dword [esp], 0
mov ecx, 1
mov eax, edi
call fcn.6106a030
mov edx, dword [ebp - 0x484]
test edx, edx
je 0x6104e122
mov eax, dword [0x610ef740]
add edx, 0x1c
mov dword [esp], edx
add eax, 0x1c
mov dword [esp + 4], eax
call sym.cygwin1.dll__strcpy
mov eax, dword [0x610ed768]
add eax, 0x88
mov eax, dword [eax + 0xcc]
cmp eax, 0xffffffff
jne 0x6104e0e6
mov edx, dword [ebp - 0x484]
mov eax, dword [ebp - 0x28]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [edx + 0x18], eax
mov edx, edi
mov eax, 1
call fcn.61089300
test eax, eax
sete byte [ebp - 0x480]
je 0x6104e0c0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.6104d510
mov dword [esp + 0xc], 0x6104d627
mov eax, dword [ebp - 0x48c]
lea edx, [ebp - 0x28]
mov dword [esp + 8], 1
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.6104cad0
test eax, eax
je 0x6104df90
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6104e091
mov eax, dword fs:[4]
sub eax, 0xfec
cmp eax, dword [0x610edaa4]
je 0x6104e088
mov eax, dword [0x610e9d90]
lea edx, [eax + 0x3a0]
mov dword [esp + 0x3c], edx
mov edx, dword [0x610ed768]
mov dword [esp + 0x40], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], 0x61149020
mov dword [esp + 0x30], 0x61110000
mov dword [esp + 0x2c], 0x610ed760
mov dword [esp + 0x28], 0x610e9000
mov eax, dword [esi + 0x120]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [edx + 0x15c]
mov dword [esp + 0x1c], eax
mov eax, dword [edx + 0x158]
mov dword [esp + 4], 0x6104d63b
mov dword [esp + 0x18], eax
mov eax, dword [0x610e9060]
mov dword [esp + 0x14], eax
mov eax, dword [0x610e905c]
mov dword [esp + 0x10], eax
mov eax, dword [0x610e9058]
mov dword [esp + 0xc], eax
mov eax, dword [0x610e9054]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.6104c6f0
mov ebx, eax
mov eax, dword [0x610eefe0]
call fcn.61090890
test ebx, ebx
je 0x6104df90
mov ebx, dword [0x610edafc]
mov eax, 1
mov edx, 1
mov dword [0x610edaf8], eax
mov ecx, 0x610edaf0
test ebx, ebx
mov dword [0x610edaf4], ebx
je 0x6104dd29
cmp edx, 3
je 0x6104dd29
mov ebx, dword [0x610edaf4]
cmp dword [ebx + 0x30], edx
je 0x6104dd2f
mov eax, dword [ebx]
test eax, eax
mov dword [ecx + 4], eax
jne 0x6104dd10
mov ebx, dword [0x610edaf4]
test ebx, ebx
je 0x6104ddc4
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6104e05f
mov dword [esp + 0x18], 0
lea edx, [ebp - 0x28]
mov eax, dword [ebx + 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 4], 0x6104d64c
mov dword [esp], edx
mov dword [esp + 8], eax
call fcn.6104c6f0
test eax, eax
je 0x6104df90
mov eax, dword [0x610edaf4]
mov ebx, dword [eax]
test ebx, ebx
mov dword [0x610edaf4], ebx
je 0x6104e057
mov edx, dword [0x610edaf8]
mov esi, esi
cmp edx, 3
je 0x6104e057
mov ebx, dword [0x610edaf4]
cmp dword [ebx + 0x30], edx
je 0x6104e04a
mov ebx, dword [ebx]
test ebx, ebx
mov dword [0x610edaf4], ebx
jne 0x6104dda0
mov eax, dword [ebp - 0x490]
lea edx, [ebp - 0x28]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.6104cd60
test eax, eax
je 0x6104df90
mov dword [esp + 0xc], 0x6104d660
mov edx, dword [ebp + 0x10]
movzx eax, byte [edx]
lea edx, [ebp - 0x28]
mov dword [esp], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x48c]
mov dword [esp + 4], eax
call fcn.6104cad0
test eax, eax
je 0x6104df90
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0
je 0x6104df09
mov ebx, dword [0x610edafc]
mov eax, 2
mov edx, 2
mov dword [0x610edaf8], eax
mov ecx, 0x610edaf0
test ebx, ebx
mov dword [0x610edaf4], ebx
je 0x6104de59
cmp edx, 3
je 0x6104de59
mov ebx, dword [0x610edaf4]
cmp dword [ebx + 0x30], edx
je 0x6104de5f
mov eax, dword [ebx]
test eax, eax
mov dword [ecx + 4], eax
jne 0x6104de40
mov ebx, dword [0x610edaf4]
test ebx, ebx
je 0x6104def4
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6104e021
mov dword [esp + 0x18], 0
lea edx, [ebp - 0x28]
mov eax, dword [ebx + 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 4], 0x6104d673
mov dword [esp], edx
mov dword [esp + 8], eax
call fcn.6104c6f0
test eax, eax
je 0x6104df90
mov eax, dword [0x610edaf4]
mov ebx, dword [eax]
test ebx, ebx
mov dword [0x610edaf4], ebx
je 0x6104df81
mov edx, dword [0x610edaf8]
mov esi, esi
cmp edx, 3
je 0x6104df81
mov ebx, dword [0x610edaf4]
cmp dword [ebx + 0x30], edx
je 0x6104df74
mov ebx, dword [ebx]
test ebx, ebx
mov dword [0x610edaf4], ebx
jne 0x6104ded0
mov eax, dword [ebp - 0x490]
lea edx, [ebp - 0x28]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.6104cd60
mov eax, dword [ebp - 0x48c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x24]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x490]
sub esp, 4
mov dword [esp], edx
call sub.KERNEL32.dll_CloseHandle
mov dword [ebp - 0x24], 0
sub esp, 4
call fcn.610a0480
cmp byte [ebp - 0x480], 0
mov eax, dword [ebp - 0x484]
mov ebx, dword [eax]
jne 0x6104df6a
mov eax, ebx
nop
lea esi, [esi]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x14
mov dword [esp], edi
call fcn.6106b6f0
jmp 0x6104df56
test ebx, ebx
jne 0x6104de67
jmp 0x6104def4
mov ebx, dword [0x610edaf4]
jmp 0x6104df74
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x6104e011
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x6104e004
mov eax, dword [ebp - 0x48c]
test eax, eax
je 0x6104dfb9
mov eax, dword [ebp - 0x48c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov esi, dword [ebp - 0x490]
test esi, esi
je 0x6104dfd4
mov edx, dword [ebp - 0x490]
mov dword [esp], edx
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
cmp byte [ebp - 0x480], 0
je 0x6104dff0
mov ebx, dword [ebp - 0x484]
test ebx, ebx
jne 0x6104dffa
mov esi, esi
lea edi, [edi]
mov eax, 0xffffffff
jmp 0x6104df60
mov dword [esp], edi
call fcn.6106b6f0
jmp 0x6104dff0
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6104df9e
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6104df97
mov dword [esp + 0xc], 0x6104d6a0
mov dword [esp + 8], 0x6104d5e0
mov dword [esp + 4], 0x40
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104de74
test ebx, ebx
jne 0x6104dd37
jmp 0x6104ddc4
mov ebx, dword [0x610edaf4]
jmp 0x6104e04a
mov dword [esp + 0xc], 0x6104d6e0
mov dword [esp + 8], 0x6104d5e0
mov dword [esp + 4], 0x40
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104dd44
xor edx, edx
xor eax, eax
jmp 0x6104dc46
mov dword [esp + 0xc], 0x6104d701
mov dword [esp + 8], 0x6104d5e0
mov dword [esp + 4], 0x40
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104dc24
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.KERNEL32.dll_TerminateProcess
sub esp, 8
call sym.cygwin1.dll___errno
mov dword [eax], 0xb
jmp 0x6104df90
mov dword [esp], eax
call fcn.610f44b8
sub esp, 4
test eax, eax
jne 0x6104dbb2
mov dword [esp + 0xc], 0x6104d16f
mov dword [esp + 8], 0x6104d060
mov dword [esp + 4], 0x8000
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104dbb2
mov edx, dword [0x610f08a0]
test edx, edx
jne 0x6104e13b
call sym.cygwin1.dll___errno
cmp dword [eax], 0xc
jne 0x6104e0d6
jmp 0x6104df90
mov dword [esp + 0xc], 0x6104d71e
mov dword [esp + 8], 0x6104d5e0
mov dword [esp + 4], 0x10
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104e12c
mov dword [esp], edx
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
call fcn.6101eac0
mov ecx, 1
mov edx, esi
mov eax, edi
call fcn.610020b0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_ResumeThread
sub esp, 4
jmp 0x6104db42
mov edx, 0x1df
mov eax, 0x6104c680
call fcn.61022e70
mov ebx, dword [0x610f08a0]
test ebx, ebx
jne 0x6104e226
mov eax, dword [ebp - 0x48c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x490]
sub esp, 4
mov dword [esp], edx
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [0x610ed768]
sub esp, 4
add eax, 0x88
mov eax, dword [eax + 0xcc]
cmp eax, 0xffffffff
jne 0x6104e1f1
xor ecx, ecx
mov edx, esi
mov eax, edi
call fcn.610020b0
jmp 0x6104dff0
mov dword [esp], eax
call fcn.610f44b8
sub esp, 4
test eax, eax
jne 0x6104e1e1
mov dword [esp + 0xc], 0x6104d16f
mov dword [esp + 8], 0x6104d060
mov dword [esp + 4], 0x8000
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104e1e1
mov dword [esp + 0xc], 0x6104d72b
mov dword [esp + 8], 0x6104d5e0
mov dword [esp + 4], 0x10
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104e1aa
mov dword [esp + 0xc], 0x6104d760
lea edx, [ebp - 0x28]
mov eax, dword [0x610ef740]
mov dword [esp + 0x20], edx
lea edx, [ebp - 0x78]
add eax, 0x1c
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x494]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
mov dword [esp + 8], 0x6104d5e0
mov dword [esp + 4], 0x10
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104da89
call fcn.610f49e0
jmp 0x6104da50
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x48c]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov dword [esp + 0xc], 0x6104d7a0
mov dword [esp + 8], 0x6104d5e0
mov dword [esp + 4], 0x8000
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6104dff0
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov dword [esp + 0xc], 0x6104d7e0
jmp 0x6104e2d4
mov dword [esp + 0xc], 0x6104d820
jmp 0x6104e2d4
or dword [ebp - 0x494], 8
jmp 0x6104d8ee