Function at 0x47869a
Capabilities:
Create thread

Disassembly:
mov eax, edx
call 0x4af5cb
test al, al
jne 0x4783f7
cmp dx, 0x24
jne 0x4783b1
mov dword [ebp - 8], edi
jmp 0x4783ea
invalid
cmp dx, 0x2a
jne 0x4783c2
movsx eax, byte [ecx]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x1c], esi
jmp 0x4783ea
cmp dx, 0x2b
jne 0x4783d3
movsx eax, byte [ecx]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], esi
jmp 0x4783ea
cmp dx, 0x26
jne 0x4783de
mov dword [ebp - 0x28], edi
jmp 0x4783ea
cmp dx, 0x23
jne 0x4783ea
movsx eax, byte [ecx]
mov dword [ebp - 0x60], eax
inc ecx
inc ecx
mov dx, word [ecx]
cmp dx, si
mov dword [ebp - 4], ecx
jne 0x47839b
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x44], esi
jne 0x4783ba
jne 0x4783ba
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x54], str.__LastTID
mov dword [ebp - 0x5c], esi
call 0x4af671
mov eax, dword [ebp - 4]
mov dword [ebp + 8], eax
mov ax, word [eax]
cmp ax, 0x2d
pop ecx
mov dword [ebp - 0x50], 0x80000000
mov cl, 0x2a
jne 0x47842b
mov cl, al
movsx ecx, cl
movzx eax, ax
cmp ecx, eax
mov dword [ebp - 0x10], ecx
jne 0x478607
push 5
pop edi
push edi
lea eax, [ebp - 4]
push eax
push 0x4a99ec
call 0x4b74bc
add esp, 0xc
test al, al
je 0x478461
mov dword [ebp - 0x24], 1
jmp 0x4785f8
push 6
pop ebx
push ebx
lea eax, [ebp - 4]
push eax
push str._waitx
call 0x4b74e1
add esp, 0xc
test al, al
je 0x478486
mov dword [ebp - 0x24], 2
jmp 0x4785f8
push edi
lea eax, [ebp - 4]
push eax
push str._here
call 0x4b7503
add esp, 0xc
test al, al
je 0x4784a5
or byte [ebp - 0x13], 1
jmp 0x4785f8
push ebx
lea eax, [ebp - 4]
push eax
push str._delay
call 0x4b7522
add esp, 0xc
test al, al
je 0x4784c4
or byte [ebp - 0x17], 2
jmp 0x4785f8
push ebx
lea eax, [ebp - 4]
push eax
push str._waitp
call 0x4b7541
add esp, 0xc
test al, al
je 0x4784e6
mov dword [ebp - 0x30], 0x400
jmp 0x4785f8
push edi
lea eax, [ebp - 4]
push eax
push str._idle
call 0x4b7563
add esp, 0xc
test al, al
je 0x478508
mov dword [ebp - 0x50], 0xfffffff1
jmp 0x4785f8
push 4
lea eax, [ebp - 4]
push eax
push str._exp
call 0x4b7586
add esp, 0xc
test al, al
je 0x47852b
mov dword [ebp - 8], 1
jmp 0x4785f8
push edi
lea eax, [ebp - 4]
push eax
push str._link
call 0x4b75a8
add esp, 0xc
test al, al
je 0x478550
mov dword [ebp - 0x2c], 0x2a
mov dword [ebp - 0x1c], esi
jmp 0x4785f8
push edi
mov edi, dword [ebp - 4]
push edi
push str._tid:
call 0x4b0ad6
add esp, 0xc
test al, al
je 0x478590
add dword [ebp - 4], 0xa
mov ebx, dword [ebp - 4]
lea eax, [ebp - 4]
push eax
call fcn.0047cae4
mov eax, dword [ebp - 4]
pop ecx
sub eax, ebx
sar eax, 1
push eax
push ebx
lea ecx, [ebp - 0x44]
call 0x4b5826
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x54], eax
jmp 0x4785cb
push ebx
push edi
push str._htid:
call 0x4b0b13
add esp, 0xc
test al, al
lea eax, [ebp - 4]
push eax
je 0x4785f2
add dword [ebp - 4], 0xc
mov ebx, dword [ebp - 4]
call fcn.0047cb21
mov eax, dword [ebp - 4]
pop ecx
sub eax, ebx
sar eax, 1
push eax
push ebx
lea ecx, [ebp - 0x40]
call 0x4b5863
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x5c], eax
cmp edi, dword [ebp - 4]
jae 0x4785e7
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 0x4af851
jmp 0x4785f7
invalid
call fcn.0047cb89
pop ecx
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp dword [ebp - 0x10], eax
je 0x47843c
cmp dword [ebp - 0x1c], esi
jne 0x478611
cmp dword [ebp - 0x24], esi
je 0x478614
mov dword [ebp - 0x30], esi
movsx ebx, word [ebp - 0x18]
or ebx, dword [ebp - 0x30]
lea eax, [ebp - 4]
or ebx, dword [ebp - 0x14]
push eax
or ebx, dword [ebp - 0x28]
call 0x4af88b
mov eax, dword [ebp - 4]
cmp word [eax], si
pop ecx
jne 0x47863d
mov esi, 0x80070057
jmp 0x478a5d
cmp dword [ebp - 8], esi
mov dword [ebp - 0x3c], esi
je 0x47866b
mov ecx, dword [ebp - 0xc]
push 1
push esi
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 8]
call 0x4c354f
mov eax, dword [ebp - 0x3c]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
call 0x4af8c7
mov edi, dword [ebp + 8]
jmp 0x47867d
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call 0x4af8db
mov edi, dword [ebp - 4]
mov ax, word [edi]
cmp ax, si
pop ecx
jne 0x478690
mov esi, 0x80070057
jmp 0x478a55
movzx eax, ax
cmp dword [ebp - 0x10], eax
mov dword [ebp - 0x4c], 0x100000
add byte [eax], dl
add byte [ecx + 0x5975b875], cl
movzx eax, word [edi + 2]
cmp dword [ebp - 0x10], eax
jne 0x4786fb
push 3
lea eax, [edi + 4]
push eax
push 0x4b151c
call 0x4b0c32
add esp, 0xc
test al, al
je 0x4786fb
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 4]
add edi, 0xa
push eax
mov dword [ebp - 4], edi
call 0x4ba3a4
mov eax, dword [ebp - 0x4c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x48]
add eax, 0x1fff
adc ecx, esi
and eax, 0xffffe000
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], ecx
jmp 0x4786fb
lea eax, [ebp + 8]
push eax
call fcn.0047cc8c
pop ecx
mov eax, dword [ebp + 8]
movzx eax, word [eax]
cmp dword [ebp - 0x10], eax
je 0x4786f1
cmp dword [ebp - 0x2c], esi
je 0x478713
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
jmp 0x478715
xor eax, eax
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x58], eax
jne 0x478728
cmp eax, esi
je 0x478728
mov edi, eax
mov dword [ebp - 0x10], edi
jmp 0x478737
xor edi, edi
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x10], edi
je 0x478737
cmp dword [ebp - 0x24], esi
jne 0x47874b
cmp eax, esi
je 0x47874b
cmp edi, esi
je 0x47874b
push eax
call 0x4b017b
pop ecx
mov dword [ebp - 4], eax
jmp 0x47874e
mov dword [ebp - 4], esi
lea eax, [ebp - 0x34]
push 4
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x6c], eax
call 0x50aba2
cmp eax, esi
pop ecx
je 0x478774
mov ecx, dword [ebp - 0xc]
push 1
push dword [ecx + 0x44]
mov ecx, eax
call 0x4afb77
jmp 0x478776
xor eax, eax
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x48]
mov dword [ebp - 8], eax
je 0x47878c
xor edi, edi
lea eax, [ebp - 0x20]
push 0x9c
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x68], eax
call 0x50abe3
cmp eax, esi
pop ecx
je 0x4787b1
push edi
push dword [ebp - 0xc]
mov ecx, eax
call 0x4a6b97
jmp 0x4787b3
xor eax, eax
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x20], eax
jne 0x4787c2
mov byte [eax + 0x91], 1
cmp dword [ebp - 0x14], 0
mov edi, dword [ebp - 0x20]
mov esi, 0x4c0fb8
jne 0x4787d9
cmp dword [ebp - 0x10], 0
jne 0x4787d9
mov dword [edi + 0x24], esi
mov eax, dword [ebp - 8]
push 0
mov dword [edi + 0x48], eax
push dword [ebp - 0x3c]
mov ecx, edi
call 0x4c0aa1
cmp dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x64]
mov dword [edi + 0x44], eax
mov dword [ebp - 8], esi
je 0x4787ff
mov eax, dword [ebp - 0xc]
jmp 0x47880f
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x478812
mov eax, dword [eax + 0x150]
mov dword [edi + 0x24], eax
mov dword [ebp - 8], eax
mov esi, 0x4c1b94
push esi
call dword [0x4a64f0]
push dword [ebp - 8]
mov ecx, edi
iretd
push dword [ebp - 0xc]
call 0x4b21c9
cmp dword [ebp - 0x28], 0
je 0x47883d
push 0
push edi
xor eax, eax
call 0x4c4540
pop ecx
pop ecx
cmp dword [ebp - 0x1c], 0
jne 0x478857
add dword [0x4c1338], 1
cmp dword [ebp - 0x30], 0
je 0x478857
add dword [0x4c133c], 1
cmp byte [0x4c0de4], 0
jne 0x478867
mov byte [0x4c0de4], 1
push esi
call dword [0x4a64f4]
cmp dword [ebp - 0x28], 0
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 0x92]
mov byte [edi + 0x92], cl
mov al, byte [eax + 9]
mov byte [edi + 9], al
je 0x47888d
mov byte [edi + 9], 1
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.00446497
push 0x44
lea ecx, [ebp - 8]
clc