Function at 0x421900
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov edi, edx
mov ebx, ecx
mov eax, dword [0x542040]
xor eax, ebp
mov dword [ebp - 0x10], eax
test ecx, ecx
jne 0x421937
mov eax, dword [0x543fe0]
cmp eax, 0xffffffff
je 0x4219c0
mov ebx, 0x100000
test eax, eax
jne 0x421937
mov ebx, 0x80000
push 0x10
call fcn.0048d95d
add esp, 4
mov esi, eax
mov eax, edi
shr eax, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x54adec]
bt ecx, eax
jae 0x4219b2
push edi
call fcn.00472000
add esp, 4
mov dword [esi], edi
mov edi, dword [ebp + 8]
test edi, edi
setne byte [esi + 4]
mov eax, dword [ebp + 0xc]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0xc], eax
xor eax, eax
push eax
push 0x10000
push esi
push 0x421d70
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4219f1
test edi, edi
je 0x4219e4
mov dword [edi], eax
test eax, eax
setne bl
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0048e2e5
mov eax, ebx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, edi
shr eax, 0x15
mov byte [eax + 0x552dec], 1
jmp 0x421962
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x543fe0
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x421aeb
mov eax, dword [0x543fe0]
jmp 0x421929
push eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x421999
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
cmp eax, 0x27a
jg 0x421a91
cmp dword [ebp - 0x20], 8
je 0x421aa7
cmp dword [ebp - 0x20], 0xe
je 0x421aa7
mov eax, dword [0x548c84]
mov ecx, dword [0x545744]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x421b10
lea ebx, [ebp - 0x1c]
push dword [ebp - 0x20]
push ebx
call fcn.004690d0
add esp, 8
movsx eax, byte [ebx + 0xb]
test eax, eax
jns 0x421a59
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
test eax, eax
js 0x421afa
sete cl
test ebx, ebx
setne dl
or dl, cl
je 0x421b01
push eax
push ebx
push dword [0x548c80]
call fcn.00434e40
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x421ab0
push dword [ebp - 0x1c]
call fcn.0048d98d
jmp 0x421aad
cmp dword [ebp - 0x20], 0x5af
je 0x421aa7
cmp dword [ebp - 0x20], 0x27b
jne 0x421a1b
push ebx
call fcn.004d89b0
add esp, 4
test esi, esi
mov eax, edi
je 0x421999
mov eax, dword [esi]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x54adec]
bt edx, ecx
jae 0x421adb
push eax
call fcn.00472130
add esp, 4
push esi
call fcn.0048d98d
add esp, 4
mov eax, edi
jmp 0x421999
mov dword [0x543fe0], 0
jmp 0x421932
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 0x421b06
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 0x524b41
call fcn.004bbec0
push 0x548c84
call fcn.0048d9d1
add esp, 4
cmp dword [0x548c84], 0xffffffff
jne 0x421a3c
push 0x20
push str.create_thread_last_error
call fcn.00434e00
add esp, 8
mov dword [0x548c80], eax
push 0x548c84
call fcn.0048da4b
add esp, 4
jmp 0x421a3c