Function at 0x54c230
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
call fcn.0054a8d0
test eax, eax
je 0x54c3c8
mov ebp, dword [esp + 0x40]
mov edi, eax
test ebp, ebp
je 0x54c25a
mov eax, dword [eax + 0xb4]
mov edx, dword [esp + 0x40]
mov dword [edx], eax
mov eax, dword [esp + 0x4c]
mov esi, dword [sym.imp.KERNEL32.DLL_CreateEventA]
xor ebx, ebx
mov ebp, dword [sym.imp.KERNEL32.DLL_Sleep]
mov dword [edi + 0x68], 0
mov dword [edi + 0x24], 1
mov dword [edi + 0x14], 0xffffffff
mov dword [edi + 4], eax
mov eax, dword [esp + 0x48]
mov dword [edi + 8], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call esi
sub esp, 0x10
test eax, eax
mov dword [edi + 0x18], eax
jne 0x54c2e2
test ebx, ebx
je 0x54c2d0
mov dword [esp], 0x14
call ebp
sub esp, 4
cmp ebx, 4
je 0x54c2e2
add ebx, 1
jmp 0x54c28b
mov dword [esp], 0
call dword [sym.imp.KERNEL32.DLL_Sleep]
sub esp, 4
jmp 0x54c2cb
lea ebx, [edi + 0x38]
mov dword [edi + 0x1c], 0xffffffff
mov eax, ebx
call fcn.0054a980
mov esi, dword [edi + 0x18]
mov dword [edi], 0xbab1f00d
mov dword [edi + 0x6c], 0
mov dword [edi + 0x64], 0
test esi, esi
je 0x54c3a8
mov ecx, dword [esp + 0x44]
xor esi, esi
test ecx, ecx
je 0x54c33e
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x44]
mov eax, dword [eax]
mov esi, dword [ecx + 8]
test al, 8
mov dword [edi + 0x24], eax
jne 0x54c480
mov eax, dword [esp + 0x44]
mov eax, dword [eax + 0xc]
mov dword [edi + 0x6c], eax
mov dword [esp + 4], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x54af60
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
mov esi, eax
lea eax, [eax - 1]
cmp eax, 0xfffffffd
jbe 0x54c3d5
mov eax, dword [edi + 0x18]
test eax, eax
je 0x54c388
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
sub esp, 4
lea eax, [edi + 0x1c]
mov dword [esp], eax
call fcn.0054a170
mov eax, ebx
call fcn.0054a980
mov dword [edi + 0x18], 0
mov dword [edi + 0x14], 0
mov edx, dword [esp + 0x40]
test edx, edx
je 0x54c3ba
mov eax, dword [esp + 0x40]
mov dword [eax], 0
mov eax, dword [edi + 0xb0]
test eax, eax
je 0x54c471
add esp, 0x2c
mov eax, 0xb
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [edi + 0x6c]
mov eax, 0xfffffff1
cmp ecx, 0xfffffff2
jl 0x54c400
cmp ecx, 0xffffffff
mov eax, 0xfffffffe
jl 0x54c400
cmp ecx, 0xe
mov eax, 0xf
jle 0x54c490
lea esi, [esi]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
mov eax, dword [edi + 0x18]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
sub esp, 4
test byte [edi + 0x24], 4
jne 0x54c450
mov dword [edi + 0x14], esi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
sub esp, 4
mov dword [esp], 0
call dword [sym.imp.KERNEL32.DLL_Sleep]
sub esp, 4
xor eax, eax
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edi + 0x14], 0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
sub esp, 4
jmp 0x54c434
mov eax, edi
call fcn.0054a670
jmp 0x54c3c8
call fcn.0054aab0
mov eax, dword [eax + 0x6c]
mov dword [edi + 0x6c], eax
jmp 0x54c33e
cmp ecx, 2
mov eax, 2
cmovle eax, ecx
jmp 0x54c400