Function at 0x1005bae0
Capabilities:
Create thread
Suspend thread

Disassembly:
sub esp, 0x24
mov eax, dword [0x1008e168]
xor eax, esp
mov dword [esp + 0x20], eax
cmp dword [0x1008f77c], 0
push ebp
mov ebp, dword [esp + 0x2c]
je 0x1005bb13
mov eax, 0xffffb0af
pop ebp
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.1007d8c1
add esp, 0x24
ret 8
push ebx
push esi
mov ebx, 0x10005a20
push edi
sub ebx, 0x10092660
mov edi, 0x30
jmp 0x1005bb30
mov edx, 0x104
mov eax, 0x10092660
lea ebx, [ebx]
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x1005bb5e
movzx ecx, word [ebx + eax]
test cx, cx
je 0x1005bb5e
mov word [eax], cx
add eax, 2
dec edx
jne 0x1005bb40
jmp 0x1005bb62
test edx, edx
jne 0x1005bb65
sub eax, 2
xor ecx, ecx
mov word [eax], cx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
xor esi, esi
mov edx, ecx
test ecx, ecx
jne 0x1005bb84
mov dword [esp + 0x18], 0x30
jmp 0x1005bbca
mov eax, 0xcccccccd
inc esi
mul edx
shr edx, 3
test edx, edx
jne 0x1005bb84
cmp esi, 0xb
jge 0x1005bbca
lea esi, [esp + esi*2 + 0x18]
xor eax, eax
mov word [esi], ax
sub esi, 2
mov eax, 0xcccccccd
lea esi, [esi - 2]
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
movsx ax, byte [ecx + 0x10005a3c]
mov ecx, edx
mov word [esi + 2], ax
test ecx, ecx
jne 0x1005bba4
mov ecx, 0x104
mov eax, 0x10092660
cmp word [eax], 0
je 0x1005bbe2
add eax, 2
dec ecx
jne 0x1005bbd4
jmp 0x1005bc38
test ecx, ecx
je 0x1005bc38
mov edx, 0x104
sub edx, ecx
mov ecx, 0x104
lea eax, [edx*2 + 0x10092660]
sub ecx, edx
je 0x1005bc2d
add edx, 0x7ffffefa
lea edi, [esp + 0x18]
add edx, ecx
sub edi, eax
jmp 0x1005bc10
test edx, edx
je 0x1005bc29
movzx esi, word [edi + eax]
test si, si
je 0x1005bc29
mov word [eax], si
dec edx
add eax, 2
dec ecx
jne 0x1005bc10
jmp 0x1005bc2d
test ecx, ecx
jne 0x1005bc30
sub eax, 2
xor ecx, ecx
mov word [eax], cx
lea edi, [ecx + 0x30]
lea eax, [esp + 0x10]
push eax
push 0
push 1
push 0x10092660
call 0x100a3eae
mov esi, eax
cmp esi, 0xffffb192
je 0x1005bb30
test esi, esi
js 0x1005bd72
mov esi, dword [esp + 0x3c]
mov ecx, 0x1008f578
mov edx, 0x100
sub esi, ecx
lea eax, [edx + 0x7ffffefe]
test eax, eax
je 0x1005bc8f
movzx eax, word [esi + ecx]
test ax, ax
je 0x1005bc8f
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x1005bc71
jmp 0x1005bc93
test edx, edx
jne 0x1005bc96
sub ecx, 2
xor eax, eax
mov word [ecx], ax
mov dword [0x1008f778], eax
mov dword [0x1008f7b0], eax
lea eax, [esp + 0x14]
push eax
push 0
push dword [ebp]
push 0x1005ba50
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x1008f77c], eax
test eax, eax
jne 0x1005bcda
push dword [esp + 0x10]
call fcn.10064720
mov esi, 0xfffffc0d
jmp 0x1005bd72
mov eax, dword [0x1008e074]
cmp eax, 0xffffffff
je 0x1005bce9
lea edi, [eax + eax*4]
jmp 0x1005bcec
or edi, 0xffffffff
push dword [ebp + 0x14]
push dword [ebp + 0x1c]
push 0
push 0xe
push dword [ebp + 0x18]
call fcn.10070100
mov esi, eax
cmp esi, 0xfffffbdf
je 0x1005bd4c
jmp 0x1005bd10
push 0xc8
push 0
lea eax, [esp + 0x18]
push eax
call fcn.10065100
test eax, eax
jns 0x1005bd90
cmp edi, 0xffffffff
jle 0x1005bd30
dec edi
cmp edi, 0xffffffff
je 0x1005bd89
push dword [ebp + 0x14]
push dword [ebp + 0x1c]
push 0
push 0xe
push dword [ebp + 0x18]
call fcn.10070100
mov esi, eax
cmp esi, 0xfffffbdf
jne 0x1005bd10
push dword [esp + 0x10]
call sub.KERNEL32.dll_SetEvent
push dword [esp + 0x10]
call fcn.10064720
push dword [0x1008f77c]
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov ecx, dword [esp + 0x30]
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
xor ecx, esp
call fcn.1007d8c1
add esp, 0x24
ret 8
mov esi, 0xffffb0af
jmp 0x1005bd4c
push dword [esp + 0x10]
mov esi, dword [0x1008f7b0]
call fcn.10064720
mov eax, dword [0x1008f778]
mov dword [ebp + 0x10], eax
xor eax, eax
mov dword [0x1008f778], 0
mov word [0x1008f578], ax
jmp 0x1005bd72