Function at 0x5236a0
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x576378
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5d6b80]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov byte [ebp - 0x10], 0
xor ebx, ebx
lea eax, [esi + 4]
xor edi, edi
mov dword [ebp - 0x1c], ebx
xor ecx, ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ecx
push eax
mov dword [ebp - 4], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x90]
test eax, eax
je 0x523703
push eax
call fcn.0052616f
add esp, 4
mov dword [esi + 0x90], edi
mov dword [esi + 0x94], 0
mov dword [esi + 0x98], 0
cmp dword [esi + 0x30], 0
je 0x523844
mov ecx, dword [esi + 0x34]
xor edi, edi
test ecx, ecx
je 0x523741
mov edx, dword [esi + 0x2c]
mov eax, edx
nop
cmp dword [eax], 0
jne 0x5237be
inc edi
add eax, 4
cmp edi, ecx
jb 0x523730
xor edi, edi
test edi, edi
je 0x523841
jmp 0x523750
mov eax, dword [esi]
mov ecx, esi
push 0
call dword [eax + 0xc]
test eax, eax
jne 0x52383e
test edi, edi
je 0x52383e
mov eax, dword [edi + 4]
test eax, eax
je 0x523808
cmp dword [eax + 8], 0
jne 0x523784
cmp dword [eax + 4], 0
jne 0x523808
push dword [edi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x523808
mov ecx, dword [esi + 0x98]
mov ebx, dword [esi + 0x94]
cmp ebx, ecx
jne 0x5237eb
mov edx, dword [esi + 0x90]
cmp edi, edx
jb 0x5237b5
lea eax, [edx + ecx*4]
cmp edi, eax
jb 0x523ad0
test ecx, ecx
jne 0x5237c3
lea ebx, [ecx + 1]
jmp 0x5237cf
mov edi, dword [edx + edi*4]
jmp 0x523743
add ebx, ebx
js 0x523808
cmp ebx, 0x1fffffff
ja 0x523808
push 4
push ebx
push edx
call fcn.00526ca1
add esp, 0xc
test eax, eax
je 0x523808
mov dword [esi + 0x98], ebx
mov dword [esi + 0x90], eax
mov ecx, dword [esi + 0x94]
mov eax, dword [esi + 0x90]
lea ecx, [eax + ecx*4]
test ecx, ecx
je 0x523802
mov eax, dword [edi]
mov dword [ecx], eax
inc dword [esi + 0x94]
test edi, edi
je 0x52383e
mov ecx, dword [edi + 8]
test ecx, ecx
jne 0x523834
mov eax, dword [edi + 0xc]
xor edx, edx
mov ebx, dword [esi + 0x34]
div ebx
inc edx
mov edi, edi
cmp edx, ebx
jae 0x523834
mov eax, dword [esi + 0x2c]
mov eax, dword [eax + edx*4]
test eax, eax
cmovne ecx, eax
inc edx
test ecx, ecx
je 0x523820
mov edi, ecx
test ecx, ecx
jne 0x523750
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
cmp dword [esi + 0x94], 0
jg 0x523894
cmp dword [esi + 0x7c], 0
je 0x5238b6
push 0
push 0
push 0x12
push dword [esi + 0x80]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
push 0x2710
push dword [esi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x523882
push 0
push dword [esi + 0x7c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x7c], 0
jmp 0x5238b6
cmp dword [esi + 0x7c], 0
jne 0x5238b6
lea eax, [esi + 0x80]
push eax
push 0
push esi
push 0x523d40
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x7c], eax
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 4
push 1
push 0
call fcn.00526ca1
add esp, 0xc
test eax, eax
je 0x5238ec
mov ecx, 1
mov ebx, eax
mov dword [ebp - 0x14], ecx
mov edi, 1
mov ecx, dword [esi + 0x1c]
mov dword [ebp - 0x1c], ebx
mov dword [eax], ecx
mov dword [ebp - 0x18], edi
mov ecx, dword [ebp - 0x14]
lea edx, [esi + 0x20]
cmp edi, ecx
jne 0x52393a
cmp edx, ebx
jb 0x523905
lea eax, [ebx + ecx*4]
cmp edx, eax
jb 0x523ad0
test ecx, ecx
jne 0x52390e
lea edi, [ecx + 1]
jmp 0x52391a
add edi, edi
js 0x52394b
cmp edi, 0x1fffffff
ja 0x52394b
push 4
push edi
push ebx
call fcn.00526ca1
add esp, 0xc
test eax, eax
je 0x523950
mov ecx, edi
lea edx, [esi + 0x20]
mov edi, dword [ebp - 0x18]
mov ebx, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], ebx
lea ecx, [ebx + edi*4]
test ecx, ecx
je 0x523945
mov eax, dword [edx]
mov dword [ecx], eax
inc edi
mov dword [ebp - 0x18], edi
jmp 0x523953
mov edi, dword [ebp - 0x18]
jmp 0x523956
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
cmp dword [esi + 0x88], 0
lea ebx, [esi + 0x88]
mov edx, dword [ebp - 0x1c]
je 0x5239bf
cmp edi, ecx
jne 0x5239ab
cmp ebx, edx
jb 0x52397b
lea eax, [edx + ecx*4]
cmp ebx, eax
jb 0x523ad0
test ecx, ecx
jne 0x523984
lea edi, [ecx + 1]
jmp 0x523990
add edi, edi
js 0x5239bf
cmp edi, 0x1fffffff
ja 0x5239bf
push 4
push edi
push edx
call fcn.00526ca1
add esp, 0xc
test eax, eax
je 0x5239bc
mov edx, eax
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
lea ecx, [edx + edi*4]
test ecx, ecx
je 0x5239b6
mov eax, dword [ebx]
mov dword [ecx], eax
inc edi
mov dword [ebp - 0x18], edi
jmp 0x5239bf
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
test edi, edi
jle 0x523ada
push 0xffffffffffffffff
push 0
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, edi
jae 0x523ab7
mov eax, dword [esi]
mov ecx, esi
push 0
call dword [eax + 0xc]
test eax, eax
je 0x5239f2
mov bl, 1
mov dword [ebp - 0x10], ebx
jmp 0x523a10
mov eax, dword [esi]
mov ecx, esi
push 0
call dword [eax + 0x10]
test eax, eax
je 0x523a56
mov eax, dword [esi + 0x20]
test eax, eax
je 0x523a0d
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x523a2e
push eax
call fcn.0052616f
add esp, 4
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
test bl, bl
je 0x5236ce
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 0x8c]
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x94]
xor eax, eax
test edx, edx
jle 0x523a84
mov ecx, dword [esi + 0x90]
cmp dword [ecx], edi
je 0x523a87
inc eax
add ecx, 4
cmp eax, edx
jl 0x523a78
or eax, 0xffffffff
xor ebx, ebx
test eax, eax
lea eax, [esi + 4]
push eax
setns bl
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x523a0d
mov eax, dword [esi]
lea ecx, [esi + 0x8c]
push ecx
push 9
push dword [ecx]
mov ecx, esi
call dword [eax + 0x18]
jmp 0x523a0d
mov ebx, dword [ebp - 0x10]
cmp eax, 0xffffffff
movzx ebx, bl
mov eax, 1
cmove ebx, eax
mov dword [ebp - 0x10], ebx
jmp 0x523a10
push 0x80004005
call fcn.0045a8f0
push 0
push 0
push 1
push 0xc000008c
call dword [sym.imp.KERNEL32.dll_RaiseException]