Function at 0x438860
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48481b
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x4c600c]
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 ebx, edx
lea esi, [ecx + 0xc]
mov dword [ebp - 0x3c], ecx
push esi
mov dword [ebp - 0x44], esi
mov byte [ebp - 0x40], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x40], 1
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + 0x28]
test ecx, ecx
jne 0x4388c2
mov dword [eax + 0x28], 1
jmp 0x43893c
cmp ecx, 1
jne 0x4388f2
sub esp, 0xc
mov ecx, esp
push str.StartThreadImpl__:_the_thread_is_already_starting
call fcn.00438e30
lea ecx, [ebp - 0x8c]
call fcn.00437e10
push 0x4c38b0
lea eax, [ebp - 0x8c]
push eax
call fcn.0046b639
cmp ecx, 4
jge 0x438908
sub esp, 0xc
mov ecx, esp
push str.StartThreadImpl__:_the_thread_is_already_running
call fcn.00438e50
jmp 0x4388d6
test byte [eax + 4], 1
jne 0x43891f
sub esp, 0xc
mov ecx, esp
push str.StartThreadImpl__:_the_thread_is_not_allowed_to_restart
call fcn.00412123
jmp 0x4388d6
mov dword [eax + 0x28], 1
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0x34]
test eax, eax
je 0x43893c
cmp eax, 0xffffffff
je 0x43893c
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [ebp - 4], 0xffffffff
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x78]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x78], vtable.std::_Func_base_void___.0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x78], vtable.std::_Func_impl_class__lambda_f8b9a17fee9caf31c93db067662e9fa2___class_std::allocator_int___void___.0
mov dword [ebp - 0x74], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x78]
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 5
mov edi, dword [ebp - 0x54]
test edi, edi
je 0x4389c3
mov eax, dword [edi]
lea ecx, [ebp - 0x38]
push ecx
mov esi, dword [eax]
mov ecx, esi
call dword [0x48d4b4]
mov ecx, edi
call esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x54]
test edi, edi
je 0x4389f5
mov esi, dword [edi]
lea eax, [ebp - 0x78]
cmp edi, eax
setne al
mov esi, dword [esi + 0x10]
mov ecx, esi
movzx eax, al
push eax
call dword [0x48d4b4]
mov ecx, edi
call esi
mov dword [ebp - 0x54], 0
mov dword [ebp - 4], 8
mov esi, dword [ebp - 0x3c]
mov eax, dword [esi]
mov edi, dword [eax + 4]
cmp edi, fcn.00401b30
je 0x438a1b
mov ecx, edi
call dword [0x48d4b4]
mov ecx, esi
call edi
mov esi, dword [ebp - 0x3c]
add esi, 0xc
mov byte [ebp - 0x40], 0
push esi
mov dword [ebp - 0x44], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x40], 1
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x3c]
mov dword [eax + 0x28], 2
mov eax, dword [ebp - 0x3c]
inc dword [eax + 0x24]
mov byte [ebp - 4], 8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x50]
push eax
mov edx, dword [ecx + 8]
mov eax, edx
neg eax
mov dword [ebp - 0x98], 0xc
mov dword [ebp - 0x94], ebx
sbb eax, eax
mov dword [ebp - 0x90], 0
and eax, 0x10000
push eax
push ecx
push 0x438600
push edx
lea eax, [ebp - 0x98]
push eax
call fcn.0046c650
mov esi, dword [ebp - 0x3c]
add esp, 0x18
mov ebx, eax
cmp byte [esi + 0x3c], 0
je 0x438ae7
mov dword [ebp - 0x48], 0x4a8500
mov byte [ebp - 0x44], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x40], edi
mov byte [ebp - 4], 0xa
mov ecx, dword [esi + 0x40]
test ecx, ecx
je 0x438ad8
cmp ecx, 0xffffffff
je 0x438ad8
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x438ad8
mov dword [esi + 0x40], 0
mov byte [ebp - 4], 8
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [ebp - 0x44], 0
mov dword [esi + 0x40], ebx
mov byte [esi + 0x3c], 1
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0x40]
test eax, eax
je 0x438bad
cmp eax, 0xffffffff
je 0x438bad
mov eax, dword [ebp - 0x50]
mov dword [ecx + 0x44], eax
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x438b36
mov esi, dword [edi]
lea eax, [ebp - 0x38]
cmp edi, eax
setne al
mov esi, dword [esi + 0x10]
mov ecx, esi
movzx eax, al
push eax
call dword [0x48d4b4]
mov ecx, edi
call esi
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0x15
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x438b55
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x48d4b4]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x38]
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x438b91
mov esi, dword [edi]
cmp edi, eax
setne al
movzx eax, al
mov esi, dword [esi + 0x10]
mov ecx, esi
push eax
call dword [0x48d4b4]
mov ecx, edi
call esi
mov dword [ebp - 0x14], 0
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.00468946
mov esp, ebp
pop ebp
ret
call fcn.0046f1c7
mov esi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push eax
lea ecx, [ebp - 0xac]
call fcn.004390b0
mov edi, eax
mov byte [ebp - 4], 0xb
add esp, 4
mov eax, esi
lea ecx, [ebp - 0xbc]
cdq
push 0
push edx
push eax
mov edx, 0xa
call fcn.00401f34
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0xcc]
push eax
call fcn.00438e70
mov byte [ebp - 4], 0xd
mov edx, eax
push str.._Last_Windows_error:
lea ecx, [ebp - 0xdc]
call fcn.00412a5f
mov byte [ebp - 4], 0xe
mov edx, eax
push edi
lea ecx, [ebp - 0xec]
call fcn.00411a06
add esp, 0x1c
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x44]
push ecx
mov ecx, eax
call fcn.0041011a
push ecx
push dword [eax + 4]
push dword [eax]
jmp 0x4388d6