Function at 0x4056f0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov ebx, ecx
xor al, al
push 0x32
mov dword [ebp - 0x10], ebx
mov edi, 0x1388
mov byte [ebp - 1], al
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x4058cd
mov esi, dword [sym.imp.KERNEL32.dll_SetEvent]
nop word [eax + eax]
mov eax, dword [ebx + 0x18]
test eax, eax
js 0x405874
add eax, 0xffffffce
mov dword [ebx + 0x18], eax
test eax, eax
jg 0x405874
mov eax, dword [ebx + 0x14]
xor edi, edi
mov dword [ebp - 0x14], edi
mov dl, 1
mov byte [ebp - 1], dl
mov dword [ebp - 0xc], eax
test eax, eax
je 0x405877
lea ecx, [eax + 0x20]
mov al, byte [ecx]
nop
test al, al
jne 0x40589f
mov al, dl
xchg byte [ecx], al
mov ebx, dword [ebp - 0xc]
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x4057bc
mov ecx, dword [ebx + 0x14]
mov byte [ebx + 4], dl
push 1
mov eax, dword [ecx]
call dword [eax + 0x50]
mov ecx, dword [ebx + 0xc]
push 1
mov eax, dword [ecx]
call dword [eax + 0x50]
cmp dword [ebx + 0x30], edi
jle 0x4057bc
xor esi, esi
nop dword [eax + eax]
mov eax, dword [ebx + 0x1c]
push dword [esi + eax + 4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
inc edi
lea esi, [esi + 0xc]
cmp edi, dword [ebx + 0x30]
jl 0x4057a0
mov esi, dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [ebp - 0xc]
mov edi, dword [edi + 0x18]
test edi, edi
je 0x405856
mov ebx, dword [edi + 0x30]
lea eax, [ebx + 0xc]
mov ecx, eax
mov dword [ebp - 0x18], eax
call fcn.00419180
push dword [ebx + 0x1c]
mov byte [ebx + 0x2c], 1
call esi
mov esi, dword [ebx]
cmp esi, dword [ebx + 4]
je 0x405807
nop word [eax + eax]
mov eax, dword [esi]
push dword [eax + 0x14]
mov byte [eax + 4], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
add esi, 4
cmp esi, dword [ebx + 4]
jne 0x4057f0
mov ecx, dword [ebp - 0x18]
call fcn.004191a0
mov ecx, dword [edi + 0x14]
mov byte [edi + 4], 1
test ecx, ecx
je 0x405821
mov eax, dword [ecx]
push 1
call dword [eax + 0x50]
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x40582f
mov eax, dword [ecx]
push 1
call dword [eax + 0x50]
xor ebx, ebx
cmp dword [edi + 0x68], ebx
jle 0x405856
xor esi, esi
nop dword [eax + eax]
mov eax, dword [edi + 0x20]
push dword [esi + eax + 4]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
inc ebx
lea esi, [esi + 0xc]
cmp ebx, dword [edi + 0x68]
jl 0x405840
mov esi, dword [ebp - 0xc]
mov eax, dword [esi + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x40586b
push dword [eax + 4]
call esi
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov dl, byte [ebp - 1]
cmp byte [ebx + 4], 0
je 0x4058ad
mov eax, dword [ebx + 0x14]
cmp byte [eax + 4], 0
je 0x4058da
test dl, dl
je 0x4058a9
test ecx, ecx
je 0x4058ad
test edi, edi
jg 0x4058a4
push 0
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x4058ad
mov ecx, dword [ebp - 8]
jmp 0x405877
sub edi, 0x32
jmp 0x4058b5
mov byte [ebp - 1], 1
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x32
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, eax
mov dword [ebp - 8], eax
test ecx, ecx
jne 0x405730
mov ecx, dword [ebx + 0x14]
test ecx, ecx
je 0x4058da
push ecx
call fcn.00404f40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret