Function at 0x544070
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f8
mov eax, dword [0x639354]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push esi
push edi
xor edi, edi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push 0xf
mov dword [ebp - 0x2f8], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov esi, dword [0x643ba4]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 4
call esi
mov ebx, eax
mov dword [ebp - 0x2f4], ebx
cmp ebx, 0xffffffff
je 0x5442be
test ebx, ebx
je 0x5442be
mov eax, dword [0x643ba0]
lea ecx, [ebp - 0x20]
push ecx
push ebx
mov dword [ebp - 0x20], 0x1c
xor esi, esi
call eax
test eax, eax
je 0x5442b7
nop
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x14], eax
jne 0x544107
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x18], eax
je 0x544107
inc esi
mov eax, dword [0x643ba8]
lea ecx, [ebp - 0x20]
push ecx
push ebx
mov dword [ebp - 0x20], 0x1c
call eax
test eax, eax
jne 0x5440f0
test esi, esi
je 0x5442b7
shl esi, 2
push esi
call fcn.0056a8df
add esp, 4
mov dword [0x643bd0], eax
test eax, eax
je 0x5442b7
push esi
push 0
push eax
call fcn.00560a80
mov eax, dword [0x643ba0]
lea ecx, [ebp - 0x20]
add esp, 0xc
mov dword [ebp - 0x20], 0x1c
xor esi, esi
mov dword [ebp - 0x2f0], esi
push ecx
push ebx
call eax
test eax, eax
je 0x5442ac
mov ebx, dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x14], eax
jne 0x544286
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebp - 0x18]
cmp ecx, eax
je 0x544286
push ecx
push 0
push 0x1f03ff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
cmp esi, 0xffffffff
je 0x544243
test esi, esi
je 0x544243
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
je 0x544265
lea eax, [ebp - 0x2ec]
mov dword [ebp - 0x2ec], 0x10001
push eax
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x544243
mov ecx, dword [ebp - 0x234]
cmp ecx, ebx
jb 0x544243
mov eax, dword [ebp + 0xc]
add eax, ebx
cmp ecx, eax
jae 0x544243
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp edi, 3
jge 0x54423a
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
lea eax, [ebp - 0x2ec]
inc edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x5441e0
mov ecx, dword [ebp - 0x2f0]
mov eax, dword [0x643bd0]
mov dword [eax + ecx*4], esi
mov esi, ecx
inc esi
mov dword [ebp - 0x2f0], esi
jmp 0x544286
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov eax, dword [0x643bd0]
mov ecx, dword [ebp - 0x2f0]
mov dword [eax + ecx*4], esi
cmp esi, 0xffffffff
je 0x544280
test esi, esi
je 0x544280
mov esi, ecx
inc esi
mov dword [ebp - 0x2f0], esi
jmp 0x544286
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x643bd0]
mov esi, dword [ebp - 0x2f0]
mov dword [eax + esi*4], 0
jmp 0x544286
mov esi, dword [ebp - 0x2f0]
mov eax, dword [0x643ba8]
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp - 0x2f4]
mov dword [ebp - 0x20], 0x1c
call eax
test eax, eax
jne 0x544171
mov ebx, dword [ebp - 0x2f4]
mov dword [0x643bd4], esi
mov edi, 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2f8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test edi, edi
jne 0x5442da
call fcn.00543fa0
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055c3a9
mov esp, ebp
pop ebp
ret