Function at 0x10087c66
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
push edi
xor edi, edi
mov dword [ebp - 0x14], ecx
inc edi
cmp word [eax], si
mov ecx, eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x50], 0x100000
mov dword [ebp - 0x4c], esi
jmp 0x10087d12
xor edx, edx
mov dx, word [ecx]
mov eax, edx
call fcn.10002df6
test al, al
jne 0x10087d17
cmp dx, 0x24
jne 0x10087cc4
mov dword [ebp - 0x10], edi
jmp 0x10087d0d
cmp dx, 0x2a
jne 0x10087ce4
movsx eax, byte [ecx]
mov dword [ebp - 8], eax
lea eax, [ecx + 2]
cmp word [eax], 0x3f
jne 0x10087cdf
or byte [ebp - 7], 1
mov ecx, eax
mov dword [ebp - 0x1c], esi
jmp 0x10087d0d
cmp dx, 0x2b
jne 0x10087cf6
movsx eax, byte [ecx]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 8], 0
jmp 0x10087d0d
cmp dx, 0x26
jne 0x10087d01
mov dword [ebp - 0x34], edi
jmp 0x10087d0d
cmp dx, 0x23
jne 0x10087d0d
movsx eax, byte [ecx]
mov dword [ebp - 0x2c], eax
inc ecx
inc ecx
cmp word [ecx], si
mov dword [ebp - 4], ecx
jne 0x10087ca9
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x58], str.__LastTID
mov dword [ebp - 0x60], esi
call fcn.1003f9c4
mov eax, dword [ebp - 4]
mov dword [ebp + 8], eax
mov ax, word [eax]
cmp ax, 0x2d
pop ecx
mov dword [ebp - 0x48], 0x80000000
mov cl, 0x2a
jne 0x10087d4b
mov cl, al
movsx ecx, cl
movzx eax, ax
cmp ecx, eax
mov dword [ebp - 0xc], ecx
jne 0x10087f50
push 5
pop ebx
push ebx
lea eax, [ebp - 4]
push eax
push 0x100ca13c
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087d81
mov dword [ebp - 0x28], 1
jmp 0x10087f41
push 6
pop edi
push edi
lea eax, [ebp - 4]
push eax
push str._waitx
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087da6
mov dword [ebp - 0x28], 2
jmp 0x10087f41
push ebx
lea eax, [ebp - 4]
push eax
push str._here
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087dc5
or byte [ebp - 0x17], 1
jmp 0x10087f41
push edi
lea eax, [ebp - 4]
push eax
push 0x100cbc78
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087de4
or byte [ebp - 0x1f], 2
jmp 0x10087f41
push edi
lea eax, [ebp - 4]
push eax
push str._waitp
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087e06
mov dword [ebp - 0x44], 0x400
jmp 0x10087f41
push ebx
lea eax, [ebp - 4]
push eax
push str._idle
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087e28
mov dword [ebp - 0x48], 0xfffffff1
jmp 0x10087f41
push 4
lea eax, [ebp - 4]
push eax
push 0x100d2608
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087e4b
mov dword [ebp - 0x10], 1
jmp 0x10087f41
push edi
lea eax, [ebp - 4]
push eax
push str._link_
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087e70
mov dword [ebp - 8], 0x12a
mov dword [ebp - 0x1c], esi
jmp 0x10087f41
push ebx
lea eax, [ebp - 4]
push eax
push str._link
call fcn.1004820a
add esp, 0xc
test al, al
je 0x10087e8f
mov dword [ebp - 8], 0x2a
jmp 0x10087e68
mov edi, dword [ebp - 4]
push 4
add edi, 2
push edi
push str.tid:
call fcn.10040df5
add esp, 0xc
test al, al
je 0x10087ed6
mov edi, dword [ebp - 4]
add dword [ebp - 4], 0xa
mov ebx, dword [ebp - 4]
lea eax, [ebp - 4]
push eax
call fcn.10005b74
mov eax, dword [ebp - 4]
pop ecx
sub eax, ebx
sar eax, 1
push eax
push ebx
lea ecx, [ebp - 0x38]
call fcn.10046247
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x58], eax
jmp 0x10087f14
push ebx
push edi
push str.htid:
call fcn.10040df5
add esp, 0xc
test al, al
lea eax, [ebp - 4]
push eax
je 0x10087f3b
mov edi, dword [ebp - 4]
add dword [ebp - 4], 0xc
mov ebx, dword [ebp - 4]
call fcn.10005b74
mov eax, dword [ebp - 4]
pop ecx
sub eax, ebx
sar eax, 1
push eax
push ebx
lea ecx, [ebp - 0x54]
call fcn.10046247
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x60], eax
cmp edi, dword [ebp - 4]
jae 0x10087f30
mov ecx, dword [ebp - 4]
sub ecx, edi
dec ecx
shr ecx, 1
inc ecx
shr ecx, 1
mov eax, 0x200020
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
lea eax, [ebp - 4]
push eax
call fcn.1003f9c4
jmp 0x10087f40
call fcn.10008e60
pop ecx
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp dword [ebp - 0xc], eax
je 0x10087d5c
cmp dword [ebp - 0x1c], esi
jne 0x10087f5a
cmp dword [ebp - 0x28], esi
je 0x10087f5d
mov dword [ebp - 0x44], esi
movsx eax, word [ebp - 0x20]
or eax, dword [ebp - 0x44]
or eax, dword [ebp - 0x18]
or eax, dword [ebp - 0x34]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 4]
push eax
call fcn.1003f9c4
mov eax, dword [ebp - 4]
cmp word [eax], si
pop ecx
jne 0x10087f89
mov esi, 0x80070057
jmp 0x1008839f
cmp dword [ebp - 0x10], esi
mov dword [ebp - 0x3c], esi
je 0x10087fa9
mov ecx, dword [ebp - 0x14]
push 1
push esi
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 8]
call fcn.10057b62
mov eax, dword [ebp - 0x3c]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
call fcn.1003f9c4
mov edi, dword [ebp + 8]
mov ax, word [edi]
cmp ax, si
pop ecx
jne 0x10087fc8
mov esi, 0x80070057
jmp 0x10088397
movzx ebx, ax
cmp dword [ebp - 0xc], ebx
jne 0x10088037
movzx eax, word [edi + 2]
cmp dword [ebp - 0xc], eax
jne 0x1008801d
push 3
lea eax, [edi + 4]
push eax
push 0x100d25e4
call fcn.10040df5
add esp, 0xc
test al, al
je 0x1008801d
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 4]
add edi, 0xa
push eax
mov dword [ebp - 4], edi
call fcn.1004bbf7
mov eax, dword [ebp - 0x50]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x4c]
add eax, 0x1fff
adc ecx, esi
and eax, 0xffffe000
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], ecx
cmp dword [ebp - 0xc], ebx
jne 0x10088037
lea eax, [ebp + 8]
push eax
call fcn.10008e60
mov eax, dword [ebp + 8]
movzx eax, word [eax]
cmp dword [ebp - 0xc], eax
pop ecx
je 0x10088022
cmp byte [ebp - 8], 0
mov edi, dword [ebp - 0x14]
je 0x10088045
mov ebx, dword [edi + 0x28]
jmp 0x10088047
xor ebx, ebx
cmp dword [ebp - 0x18], esi
je 0x10088051
cmp dword [ebp - 0x28], esi
jne 0x1008808f
cmp ebx, esi
je 0x1008808f
cmp dword [ebx + 0x128], esi
mov dword [ebp - 0x5c], 1
je 0x1008806e
test byte [ebp - 7], 1
jne 0x10087fbe
lea eax, [ebp - 0x40]
push 4
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x6c], eax
call fcn.100b4338
cmp eax, esi
pop ecx
je 0x10088094
push dword [edi + 0x44]
mov ecx, eax
call fcn.1003fb63
jmp 0x10088096
mov dword [ebp - 0x5c], esi
jmp 0x1008806e
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x48]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x30]
push 0x9c
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x64], eax
call fcn.100b4338
cmp eax, esi
pop ecx
je 0x100880c5
push ebx
push edi
mov ecx, eax
call fcn.10014f6a
jmp 0x100880c7
xor eax, eax
cmp dword [ebp - 0x18], esi
mov dword [ebp - 0x30], eax
jne 0x100880d6
mov byte [eax + 0x91], 1
cmp dword [ebp - 0x18], 0
mov edi, dword [ebp - 0x30]
mov esi, 0x100e3108
jne 0x100880eb
test ebx, ebx
jne 0x100880eb
mov dword [edi + 0x24], esi
mov eax, dword [ebp - 0x10]
push 0
mov dword [edi + 0x48], eax
push dword [ebp - 0x3c]
mov ecx, edi
call fcn.10053203
cmp dword [ebp - 0x18], 0
mov eax, dword [ebp - 4]
mov dword [edi + 0x44], eax
mov dword [ebp - 0xc], esi
je 0x10088111
mov eax, dword [ebp - 0x14]
jmp 0x1008811e
test ebx, ebx
je 0x10088121
mov eax, dword [ebx + 0x1a4]
mov dword [edi + 0x24], eax
mov dword [ebp - 0xc], eax
push 0x100e3d7c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x18], 0
jne 0x1008816c
cmp byte [ebp - 8], 0
je 0x1008816c
cmp dword [ebp - 0x28], 0
je 0x1008816c
mov esi, dword [ebp - 0x14]
mov eax, esi
mov edx, 0x7fffd
test eax, eax
je 0x1008816f
mov cl, byte [eax + 0x91]
test cl, 1
je 0x1008815c
test cl, 0x42
jne 0x10088164
dec edx
mov eax, dword [eax + 0x24]
jns 0x10088148
jmp 0x1008816f
mov dword [edi + 0x24], eax
mov dword [ebp - 0xc], eax
jmp 0x1008816f
mov esi, dword [ebp - 0x14]
push dword [ebp - 0xc]
mov ecx, edi
push esi
call fcn.1004232c
cmp dword [ebp - 0x34], 0
je 0x1008818c
push 0
push edi
xor eax, eax
call fcn.10058f9a
pop ecx
pop ecx
push 0x100e3d7c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x34], 0
mov al, byte [esi + 0x92]
mov byte [edi + 0x92], al
mov al, byte [esi + 9]
mov byte [edi + 9], al
je 0x100881b3
mov byte [edi + 9], 1
push dword [ebp + 8]
lea ecx, [ebp - 0x20]
call fcn.100501eb
push 0x44
lea ecx, [ebp - 0x10]
call fcn.10045fcc
mov esi, dword [ebp - 0x10]
push esi
call fcn.1003f93e
mov eax, dword [ebp - 0x20]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0xc]
pop ecx
xor ecx, ecx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], 4
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], eax
movsx eax, byte [ebp - 8]
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x68]
or eax, dword [ebp - 0x34]
mov byte [ebp + 0xb], cl
mov dword [esi + 0x28], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp - 4]
mov dword [esi + 0x30], eax
lea eax, [ebp - 0x24]
push eax
push 0x10004
push esi
push 0x100879c9
push dword [ebp - 0x50]
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], ebx
push ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [ebp + 0xc], eax
je 0x100882d2
xor edi, edi
cmp dword [ebp - 0x5c], edi
je 0x1008825b
push ebx
call fcn.1004022c
pop ecx
jmp 0x1008825d
xor eax, eax
mov ebx, dword [ebp - 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x10], eax
mov dword [esi], ebx
mov esi, 0x100e3d7c
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x1c], edi
jne 0x1008828f
add dword [0x100e34c0], 1
cmp dword [ebp - 0x44], edi
je 0x1008828f
add dword [0x100e34c4], 1
cmp byte [0x100e2e7c], 0
jne 0x1008829f
mov byte [0x100e2e7c], 1
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x48], 0x80000000
je 0x100882bb
push dword [ebp - 0x48]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x30], edi
jmp 0x100882e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100882dd
inc eax
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
xor edi, edi
cmp dword [ebp - 0x38], edi
je 0x100882f9
push dword [ebp - 0x58]
push dword [ebp - 0x24]
push ebx
call fcn.10048821
add esp, 0xc
push str.__LastTID
push dword [ebp - 0x24]
push ebx
call fcn.10048821
mov eax, dword [ebp - 0x60]
add esp, 0xc
cmp eax, edi
je 0x1008832b
cmp word [eax], di
je 0x1008832b
push eax
push dword [ebp + 0xc]
push ebx
call fcn.1002d145
add esp, 0xc
test eax, eax
je 0x1008832b
mov byte [ebp + 0xb], 1
cmp dword [ebp + 0xc], edi
je 0x1008833f
cmp byte [ebp + 0xb], 0
jne 0x1008833f
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], edi
je 0x10088374
cmp dword [ebp + 0xc], edi
je 0x10088374
cmp dword [ebp - 0x24], edi
je 0x10088374
push dword [ebp - 0x24]
lea eax, [ebp - 0xa8]
push str.__ncd__u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0xa8]
push eax
mov ecx, ebx
call fcn.1002c0b8
lea ecx, [ebp - 0x10]
call fcn.1003f96c
lea ecx, [ebp - 0x20]
call fcn.1003f96c
lea ecx, [ebp - 0x64]
call fcn.10050099
lea ecx, [ebp - 0x6c]
call fcn.1007ed74
mov esi, dword [ebp - 0x2c]
lea ecx, [ebp - 0x3c]
call fcn.1003f96c
lea ecx, [ebp - 0x54]
call fcn.1003f96c
lea ecx, [ebp - 0x38]
call fcn.1003f96c
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8