Function at 0x1004d5f0
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004f315
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x88
push ebx
push esi
push edi
mov eax, dword [0x100664a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0xffffffff
cmp dword [ebp + 0x10], 0
je 0x1004d8dd
cmp dword [ebp + 0x14], 0
je 0x1004d8dd
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x44], eax
xor ecx, ecx
mov eax, dword [ebp - 0x44]
mov edx, 0x1c
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.100163ab
add esp, 4
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x4c], ecx
mov byte [ebp - 4], 1
cmp dword [ebp - 0x4c], 0
je 0x1004d6bf
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x44]
mov dword [edx], eax
push fcn.100012e0
push fcn.10001230
mov ecx, dword [ebp - 0x44]
push ecx
push 0x1c
mov edx, dword [ebp - 0x4c]
add edx, 4
push edx
call fcn.100378d6
mov eax, dword [ebp - 0x4c]
add eax, 4
mov dword [ebp - 0x74], eax
jmp 0x1004d6c6
mov dword [ebp - 0x74], 0
mov ecx, dword [ebp - 0x74]
mov dword [ebp - 0x48], ecx
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x50], eax
xor ecx, ecx
mov eax, dword [ebp - 0x50]
mov edx, 0x1c
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.100163ab
add esp, 4
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x78]
mov dword [ebp - 0x58], ecx
mov byte [ebp - 4], 2
cmp dword [ebp - 0x58], 0
je 0x1004d746
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x50]
mov dword [edx], eax
push fcn.100012e0
push fcn.10001230
mov ecx, dword [ebp - 0x50]
push ecx
push 0x1c
mov edx, dword [ebp - 0x58]
add edx, 4
push edx
call fcn.100378d6
mov eax, dword [ebp - 0x58]
add eax, 4
mov dword [ebp - 0x7c], eax
jmp 0x1004d74d
mov dword [ebp - 0x7c], 0
mov ecx, dword [ebp - 0x7c]
mov dword [ebp - 0x54], ecx
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x34], edx
cmp dword [ebp + 0x18], 0x3a98
jle 0x1004d773
mov eax, dword [ebp + 0x18]
sub eax, 0x3a98
mov dword [ebp - 0x80], eax
jmp 0x1004d779
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x28], ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 8]
call fcn.10002b10
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x18], eax
push 0
mov ecx, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 8]
call fcn.10002b10
mov dword [ebp - 0x88], eax
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x38]
call fcn.10001320
mov ecx, dword [ebp - 0x40]
push ecx
mov ecx, dword [ebp - 0x34]
call fcn.10001320
push 0
push 0
lea edx, [ebp - 0x38]
push edx
push 0x1004d1e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x18]
imul eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x1004d82c
cmp dword [ebp - 0x20], 0x103
je 0x1004d82c
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x14], ecx
jmp 0x1004d83f
mov dword [ebp - 0x14], 0xfffffffe
push 0
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 8]
call fcn.10002b40
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 8]
call fcn.10002b40
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x1004d899
push 3
mov ecx, dword [ebp - 0x5c]
call fcn.10013930
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x90], ecx
jmp 0x1004d8a3
mov dword [ebp - 0x90], 0
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x1004d8d3
push 3
mov ecx, dword [ebp - 0x64]
call fcn.10013930
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x98], ecx
jmp 0x1004d8dd
mov dword [ebp - 0x98], 0
mov eax, dword [ebp - 0x14]
jmp 0x1004d908
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18