Function at 0x4c2770
Capabilities:
Terminate process

Disassembly:
sub esp, 8
push ebx
push esi
push edi
mov ebx, edx
mov edi, ecx
mov eax, dword [edi + ebx*4 + 0x170]
test eax, eax
jne 0x4c27cf
push 0x140
call fcn.0058d200
mov esi, eax
add esp, 4
test esi, esi
je 0x4c29fc
push 0x140
push 0
push esi
call fcn.005869c0
mov dword [esi + 0x118], 0x24
lea eax, [esi + 0x11c]
mov dword [edi + ebx*4 + 0x170], esi
mov dword [esi + 0x40], eax
mov dword [eax + 0x1c], 4
jmp 0x4c285e
push dword [eax + 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + ebx*4 + 0x170]
call fcn.004bb2e0
push 0x118
push 0
push dword [edi + ebx*4 + 0x170]
call fcn.005869c0
mov edx, dword [edi + ebx*4 + 0x170]
add esp, 0xc
mov ecx, edx
xorps xmm0, xmm0
neg ecx
lea eax, [edx + 0x11c]
sbb ecx, ecx
and ecx, eax
mov dword [edx + 0x40], ecx
mov eax, dword [edi + ebx*4 + 0x170]
mov eax, dword [eax + 0x40]
movups xmmword [eax], xmm0
movq qword [eax + 0x10], xmm0
mov dword [eax + 0x18], 0
mov eax, dword [edi + ebx*4 + 0x170]
mov ecx, dword [eax + 0x40]
mov edx, ecx
neg edx
sbb edx, edx
lea eax, [ecx + 0x20]
and edx, eax
jne 0x4c2849
xor eax, eax
jmp 0x4c284c
mov eax, dword [edx - 4]
push eax
lea eax, [ecx + 0x20]
neg ecx
push 0
sbb ecx, ecx
and ecx, eax
push ecx
call fcn.005869c0
mov edx, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [edi + edx*4 + 0x148]
push 0
push 0x40
push 1
mov dword [eax + 0x74], ebx
lea eax, [ebx + 1]
mov dword [edi + 0x198], eax
mov eax, dword [edi + ebx*4 + 0x170]
push 0
mov dword [eax + 0x28], 0x50
mov ecx, dword [edi + ebx*4 + 0x170]
mov eax, dword [edi + 0xc]
mov dword [ecx + 0xc], eax
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x18], 0x4c2710
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x1c], fcn.004bf9a0
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x20], 0x4bb970
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x3c], edx
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x70], 4
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov ecx, dword [edi + ebx*4 + 0x170]
mov edx, 0x1c
mov dword [ecx + 0x74], eax
mov ecx, 0x10
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x2c], edi
mov eax, dword [esp + 0x1c]
cmp word [eax], 0x17
cmove ecx, edx
push ecx
mov ecx, dword [edi + ebx*4 + 0x170]
push eax
mov ecx, dword [ecx + 0x40]
call fcn.00401000
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x54], 0x15e0
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0x58], 0x15e0
push dword [edi + 0x140]
call fcn.00562470
mov ecx, dword [edi + ebx*4 + 0x170]
add esp, 0xc
mov dword [ecx + 0x30], eax
mov eax, dword [edi + ebx*4 + 0x170]
push edi
push dword [0x61fae8]
push dword [eax + 0x30]
call fcn.00562cd0
add esp, 0xc
push 0x1000
call fcn.0058d200
mov ecx, dword [edi + ebx*4 + 0x170]
add esp, 4
mov dword [ecx + 0xe4], eax
test eax, eax
je 0x4c2a3d
mov eax, dword [edi + ebx*4 + 0x170]
mov dword [eax + 0xec], 0x1000
mov ecx, dword [edi + ebx*4 + 0x170]
call fcn.004bb390
lea eax, [esp + 0x10]
mov edx, 4
push eax
lea eax, [esp + 0x10]
push eax
lea ecx, [edx + 0x14]
call fcn.004ae770
mov esi, dword [esp + 0x14]
add esp, 8
mov eax, dword [esp + 0x10]
push 0
push 0x40
push 1
push 0
mov dword [esi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [esi], eax
mov eax, dword [edi + ebx*4 + 0x170]
pop edi
mov dword [eax + 0xd8], esi
pop esi
pop ebx
add esp, 8
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x4c4
mov edx, 0x61c4e8
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0x4c4
push 0x61c504
push 0x61c520
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x1611
mov edx, 0x61f6ec
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0x1611
push 0x61f708
push 0x61f724
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
int3