Function at 0x5140b0
Capabilities:
Create thread

Disassembly:
push edi
push esi
push ebx
sub esp, 0x50
mov edi, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
mov dword [esp], 0x64
call fcn.004edaf0
mov ebx, eax
call fcn.005136a8
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x5c], 0
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x18], esi
mov eax, dword [esp + 0x68]
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x6c]
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0x70]
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x50], 0
mov dword [ebx + 0x54], 0
mov dword [ebx + 0x4c], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
call fcn.0050ee8c
mov dword [ebx + 0x28], eax
test edi, edi
je 0x514358
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0
call sub.KERNEL32.dll_CreateEventA
sub esp, 0x10
mov dword [ebx + 0x38], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateEventA
sub esp, 0x10
mov dword [ebx + 0x44], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sub.KERNEL32.dll_CreateEventA
sub esp, 0x10
mov dword [ebx + 0x48], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x5134a8
mov dword [esp + 4], 0x100
mov dword [esp], 0
call sub.KERNEL32.dll_CreateThread
sub esp, 0x18
mov dword [ebx + 0x30], eax
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.KERNEL32.dll_SetThreadPriority
sub esp, 8
or dword [ebx + 8], 2
test esi, esi
je 0x5142d5
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0
call sub.KERNEL32.dll_CreateEventA
sub esp, 0x10
mov dword [ebx + 0x34], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateEventA
sub esp, 0x10
mov dword [ebx + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sub.KERNEL32.dll_CreateEventA
sub esp, 0x10
mov dword [ebx + 0x40], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x5133cc
mov dword [esp + 4], 0x100
mov dword [esp], 0
call sub.KERNEL32.dll_CreateThread
sub esp, 0x18
mov dword [ebx + 0x2c], eax
mov dword [esp + 4], 2
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.KERNEL32.dll_SetThreadPriority
sub esp, 8
or dword [ebx + 8], 4
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x613d60
lea esi, [esp + 0x28]
mov dword [esp], esi
call sub.msvcrt.dll_sprintf
mov eax, dword [ebx + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], str.pipe
call fcn.004d5fe0
mov dword [ebx + 4], eax
mov dword [esp + 0xc], 0x613d67
mov dword [esp + 8], 0x613d6c
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.004db720
mov dword [esp + 0xc], 0x613d79
mov dword [esp + 8], 0x613d7e
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.004db720
mov eax, dword [ebx + 4]
add esp, 0x50
pop ebx
pop esi
pop edi
ret
mov dword [ebx + 0x30], 0
jmp 0x5141ff