Function at 0x413270
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 0x4132a7
mov eax, dword [0x646084]
cmp eax, 0xffffffff
je 0x413345
mov ebx, 0x100000
test eax, eax
jne 0x4132a7
mov ebx, 0x80000
mov esi, dword [ebp + 0x10]
push 0x10
call fcn.00562bc5
add esp, 4
mov edx, edi
shr edx, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x64c810]
bt ecx, edx
jae 0x413337
push edi
mov esi, eax
call fcn.004ff440
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 0x424800
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test eax, eax
je 0x413372
test edi, edi
je 0x413369
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.00565ea5
mov eax, ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edi
shr ecx, 0x15
mov byte [ecx + 0x654810], 1
jmp 0x4132da
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x646084
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x41348e
mov eax, dword [0x646084]
jmp 0x413299
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41331e
mov dword [ebp - 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x27a
jg 0x413411
cmp edi, 8
je 0x413425
cmp edi, 0xe
je 0x413425
mov eax, dword [0x6496dc]
mov ecx, dword [0x64784c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4134b3
lea esi, [ebp - 0x20]
push edi
push esi
call fcn.00559740
add esp, 8
movsx eax, byte [esi + 0xb]
test eax, eax
jns 0x4133d6
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
test eax, eax
js 0x41349d
sete cl
test esi, esi
setne dl
or dl, cl
je 0x4134a4
push eax
push esi
push dword [0x6496d8]
call fcn.00406f40
add esp, 0xc
cmp byte [ebp - 0x15], 0
jns 0x41344a
push dword [ebp - 0x20]
call fcn.00562bc0
add esp, 4
jmp 0x41344a
cmp edi, 0x5af
je 0x413425
cmp edi, 0x27b
jne 0x41339a
lea esi, [ebp - 0x20]
push 0xd8
push str.platform_thread_win.cc
push str.CreateThreadInternal
push esi
call fcn.005bd4a0
add esp, 0x10
push esi
push ebx
call fcn.005bd4f0
add esp, 8
cmp dword [ebp - 0x24], 0
mov esi, dword [ebp - 0x28]
je 0x41331e
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 + 0x64c810]
bt edx, ecx
jae 0x41347b
push eax
call fcn.004ff570
add esp, 4
push dword [ebp - 0x24]
call fcn.00562bc0
add esp, 4
mov esi, dword [ebp - 0x28]
jmp 0x41331e
mov dword [0x646084], 0
jmp 0x4132a2
push str....._third_partylibc_srcinclude_string_view:318:_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 0x4134a9
push str....._third_partylibc_srcinclude_string_view:320:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
push 0x622e92
call fcn.0058fdd0
push 0x6496dc
call fcn.00562c08
add esp, 4
cmp dword [0x6496dc], 0xffffffff
jne 0x4133bb
push 0x20
push str.create_thread_last_error
call fcn.0040b4d0
add esp, 8
mov dword [0x6496d8], eax
push 0x6496dc
call fcn.00562c57
add esp, 4
jmp 0x4133bb