Function at 0x10019840
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003f940
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x1005801c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x20], 0
mov ebx, dword [edi + 0x3c]
cmp word [ebx], 0
jne 0x1001996e
mov dword [ebp - 4], 0
push 0x10
call fcn.1001fd46
mov edx, eax
add esp, 4
mov dword [ebp - 0x38], edx
mov byte [ebp - 4], 1
xorps xmm0, xmm0
movq qword [edx], xmm0
lea ecx, [edx + 0xc]
mov dword [edx + 8], 0
mov dword [edx + 4], 1
mov dword [edx + 8], 1
mov dword [edx], 0x10051050
mov dword [ebp - 0x24], ecx
mov dword [ecx], 0
mov dword [ecx], method.std::_Facet_base.virtual_4
mov byte [ebp - 4], 2
mov dword [ecx], 0x10050fa0
mov byte [ebp - 4], 0
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov byte [ebp - 4], 3
mov eax, dword [edi + 0x61]
mov ebx, dword [edi + 0x65]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], eax
mov dword [edi + 0x61], ecx
mov dword [edi + 0x65], edx
mov byte [ebp - 4], 0
test ebx, ebx
je 0x1001995e
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x1001995e
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock xadd dword [ebx + 8], esi
dec esi
jne 0x1001995e
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov eax, 1
mov dword [ebp - 0x20], eax
and eax, 0xfffffffe
jmp 0x10019ac6
mov dword [ebp - 4], 4
push 0x2c
call fcn.1001fd46
mov esi, eax
add esp, 4
mov dword [ebp - 0x24], esi
mov byte [ebp - 4], 5
lea eax, [esi + 0xc]
mov dword [ebp - 0x38], eax
mov ecx, ebx
xorps xmm0, xmm0
mov dword [ebp - 0x50], 0
movq qword [esi], xmm0
xor eax, eax
mov dword [esi + 8], 0
mov dword [ebp - 0x40], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x3c], 0
mov dword [esi + 4], 1
mov dword [esi + 8], 1
mov dword [esi], 0x10050f90
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 7
mov word [ebp - 0x50], ax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100199e0
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x50]
call fcn.10006330
mov byte [ebp - 4], 6
lea ebx, [esi + 0xc]
mov dword [ebx], method.std::_Facet_base.virtual_4
mov byte [ebp - 4], 7
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebx + 4]
mov dword [ebx], 0x100507e8
call fcn.100150b0
mov byte [ebp - 4], 8
mov dword [ebx + 0x1c], 0xffffffff
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x50]
call fcn.100028a0
mov byte [ebp - 4], 4
xorps xmm0, xmm0
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov byte [ebp - 4], 9
mov eax, dword [edi + 0x61]
mov dword [edi + 0x61], ebx
mov ebx, dword [edi + 0x65]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], eax
mov dword [edi + 0x65], esi
mov byte [ebp - 4], 4
test ebx, ebx
je 0x10019abb
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x10019abb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock xadd dword [ebx + 8], esi
dec esi
jne 0x10019abb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov eax, 2
mov dword [ebp - 0x20], eax
and eax, 0xfffffffd
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
mov esi, dword [sym.imp.kernel32.dll_GetCurrentProcessId]
push eax
call esi
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x28
push str.Initialization_started._PID:__d__TID:__d
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.100029b0
mov dword [ebp - 4], 0xa
push 1
push dword [edi + 0x61]
mov dword [ebp - 4], 0xffffffff
call fcn.10001840
add esp, 0x28
call esi
mov ecx, dword [edi + 0x3c]
xor ebx, ebx
cmp eax, dword [ecx + 0x600]
lea eax, [ebp - 0x1c]
push eax
push ecx
push edi
setne bl
push 0x10019770
mov dword [ebp - 0x38], ebx
call fcn.10017680
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x10019b9e
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x36
push str.Failed_to_create_TrainerLib_thread._Last_Win32:_0x_08x
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.100029b0
mov dword [ebp - 4], 0xb
push 3
push dword [edi + 0x61]
mov dword [ebp - 4], 0xffffffff
call fcn.10001840
add esp, 0x24
mov eax, ebx
jmp 0x10019d0b
mov ecx, edi
call fcn.10019d30
xor ebx, ebx
mov dword [ebp - 0x14], eax
test eax, eax
lea eax, [ebp - 0x18]
push 0xffffffffffffffff
push 0
setne bl
push eax
inc ebx
push ebx
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
jne 0x10019c1b
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x2d
push str.Failed_to_wait_on_objects._Last_Win32:_0x_08x
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.100029b0
mov dword [ebp - 4], 0xc
push 3
push dword [edi + 0x61]
mov dword [ebp - 4], 0xffffffff
call fcn.10001840
add esp, 0x24
push 1
push dword [ebp - 0x18]
call dword [sym.imp.kernel32.dll_TerminateThread]
jmp 0x10019c20
cmp eax, 1
je 0x10019c3d
push dword [ebp - 0x18]
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
cmp ebx, 2
jne 0x10019c35
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x38]
jmp 0x10019d0b
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x2a
push str.Signaled_to_unload._Waiting_for_trainer...
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.100029b0
mov dword [ebp - 4], 0xd
push 1
push dword [edi + 0x61]
mov dword [ebp - 4], 0xffffffff
call fcn.10001840
add esp, 0x20
push dword [ebp - 0x18]
call dword [sym.imp.kernel32.dll_CancelSynchronousIo]
mov ecx, dword [edi + 0x4d]
mov eax, dword [ecx]
call dword [eax + 0x1c]
push 0x1388
push dword [ebp - 0x18]
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x10019cf9
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x40
push str.Failed_to_wait_on_trainer_thread._Killing_it._Last_Win32:_0x_08x
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.100029b0
mov dword [ebp - 4], 0xe
push 2
push dword [edi + 0x61]
mov dword [ebp - 4], 0xffffffff
call fcn.10001840
add esp, 0x24
push 1
push dword [ebp - 0x18]
call dword [sym.imp.kernel32.dll_TerminateThread]
push dword [ebp - 0x18]
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001fb3b
mov esp, ebp
pop ebp
ret