Function at 0x421f50
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov edi, edx
mov ebx, ecx
mov eax, dword [0x64a040]
xor eax, ebp
mov dword [ebp - 0x10], eax
test ecx, ecx
jne 0x421f87
mov eax, dword [0x64c084]
cmp eax, 0xffffffff
je 0x422025
mov ebx, 0x100000
test eax, eax
jne 0x421f87
mov ebx, 0x80000
mov esi, dword [ebp + 0x10]
push 0x10
call fcn.0057dc30
add esp, 4
mov edx, edi
shr edx, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x6527ec]
bt ecx, edx
jae 0x422017
push edi
mov esi, eax
call fcn.00506e00
mov eax, esi
mov esi, dword [ebp + 0x10]
add esp, 4
mov dword [ebp - 0x24], eax
mov dword [eax], edi
mov edi, dword [ebp + 8]
test edi, edi
setne byte [eax + 4]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], esi
xor edx, edx
lea ecx, [ebp - 0x14]
mov dword [ecx], edx
push ecx
push 0x10000
push eax
push 0x43b840
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test eax, eax
je 0x422052
test edi, edi
je 0x422049
mov eax, dword [ebp - 0x14]
mov dword [edi], esi
mov dword [edi + 4], eax
test esi, esi
setne bl
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005810d5
mov eax, ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edi
shr ecx, 0x15
mov byte [ecx + 0x65a7ec], 1
jmp 0x421fba
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x64c084
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x422168
mov eax, dword [0x64c084]
jmp 0x421f79
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x421ffe
mov dword [ebp - 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x27a
jg 0x4220eb
cmp edi, 8
je 0x4220ff
cmp edi, 0xe
je 0x4220ff
mov eax, dword [0x64f6b4]
mov ecx, dword [0x64d82c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x42218d
lea esi, [ebp - 0x20]
push edi
push esi
call fcn.00565120
add esp, 8
movsx eax, byte [esi + 0xb]
test eax, eax
jns 0x4220b6
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
test eax, eax
js 0x422177
je 0x4220c8
test esi, esi
je 0x42217e
push eax
push esi
push dword [0x64f6b0]
call fcn.00405d50
add esp, 0xc
cmp byte [ebp - 0x15], 0
jns 0x422124
push dword [ebp - 0x20]
call fcn.0057dc2b
add esp, 4
jmp 0x422124
cmp edi, 0x5af
je 0x4220ff
cmp edi, 0x27b
jne 0x42207a
lea esi, [ebp - 0x20]
push 0xda
push str.platform_thread_win.cc
push str.CreateThreadInternal
push esi
call fcn.005e1570
add esp, 0x10
push esi
push ebx
call fcn.005e15c0
add esp, 8
cmp dword [ebp - 0x24], 0
mov esi, dword [ebp - 0x28]
je 0x421ffe
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x6527ec]
bt edx, ecx
jae 0x422155
push eax
call fcn.00506f30
add esp, 4
push dword [ebp - 0x24]
call fcn.0057dc2b
add esp, 4
mov esi, dword [ebp - 0x28]
jmp 0x421ffe
mov dword [0x64c084], 0
jmp 0x421f82
push str....._third_partylibc_srcinclude_string_view:314:_assertion___len___static_cast_size_type__numeric_limits_difference_type_::max____failed:_string_view::string_view__CharT___size_t_:_length_does_not_fit_in_difference_type_n
jmp 0x422183
push str....._third_partylibc_srcinclude_string_view:316:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
push 0x62a183
call fcn.005aacb0
push 0x64f6b4
call fcn.0057dc73
add esp, 4
cmp dword [0x64f6b4], 0xffffffff
jne 0x42209b
push 0x20
push str.create_thread_last_error
call fcn.0040b6f0
add esp, 8
mov dword [0x64f6b0], eax
push 0x64f6b4
call fcn.0057dcc2
add esp, 4
jmp 0x42209b