Function at 0x412b10
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 [0x644040]
xor eax, ebp
mov dword [ebp - 0x10], eax
test ecx, ecx
jne 0x412b47
mov eax, dword [0x646084]
cmp eax, 0xffffffff
je 0x412be5
mov ebx, 0x100000
test eax, eax
jne 0x412b47
mov ebx, 0x80000
mov esi, dword [ebp + 0x10]
push 0x10
call fcn.00564ea5
add esp, 4
mov edx, edi
shr edx, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x64c804]
bt ecx, edx
jae 0x412bd7
push edi
mov esi, eax
call fcn.004f0de0
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 0x420980
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test eax, eax
je 0x412c12
test edi, edi
je 0x412c09
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.00568175
mov eax, ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edi
shr ecx, 0x15
mov byte [ecx + 0x654804], 1
jmp 0x412b7a
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x646084
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x412d28
mov eax, dword [0x646084]
jmp 0x412b39
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x412bbe
mov dword [ebp - 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x27a
jg 0x412cab
cmp edi, 8
je 0x412cbf
cmp edi, 0xe
je 0x412cbf
mov eax, dword [0x6496cc]
mov ecx, dword [0x64783c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x412d4d
lea esi, [ebp - 0x20]
push edi
push esi
call fcn.00557c00
add esp, 8
movsx eax, byte [esi + 0xb]
test eax, eax
jns 0x412c76
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
test eax, eax
js 0x412d37
je 0x412c88
test esi, esi
je 0x412d3e
push eax
push esi
push dword [0x6496c8]
call fcn.00405c30
add esp, 0xc
cmp byte [ebp - 0x15], 0
jns 0x412ce4
push dword [ebp - 0x20]
call fcn.00564ea0
add esp, 4
jmp 0x412ce4
cmp edi, 0x5af
je 0x412cbf
cmp edi, 0x27b
jne 0x412c3a
lea esi, [ebp - 0x20]
push 0xda
push str.platform_thread_win.cc
push str.CreateThreadInternal
push esi
call fcn.005bfe00
add esp, 0x10
push esi
push ebx
call fcn.005bfe50
add esp, 8
cmp dword [ebp - 0x24], 0
mov esi, dword [ebp - 0x28]
je 0x412bbe
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 + 0x64c804]
bt edx, ecx
jae 0x412d15
push eax
call fcn.004f0f10
add esp, 4
push dword [ebp - 0x24]
call fcn.00564ea0
add esp, 4
mov esi, dword [ebp - 0x28]
jmp 0x412bbe
mov dword [0x646084], 0
jmp 0x412b42
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 0x412d43
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 0x624173
call fcn.00591ed0
push 0x6496cc
call fcn.00564ee8
add esp, 4
cmp dword [0x6496cc], 0xffffffff
jne 0x412c5b
push 0x20
push str.create_thread_last_error
call fcn.00408120
add esp, 8
mov dword [0x6496c8], eax
push 0x6496cc
call fcn.00564f37
add esp, 4
jmp 0x412c5b