Function at 0x459a60
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 [0x587040]
xor eax, ebp
mov dword [ebp - 0x10], eax
test ecx, ecx
jne 0x459a97
mov eax, dword [0x5891e0]
cmp eax, 0xffffffff
je 0x459b20
mov ebx, 0x100000
test eax, eax
jne 0x459a97
mov ebx, 0x80000
push 0x10
call fcn.004ec94e
add esp, 4
mov esi, eax
mov eax, edi
shr eax, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x58ffec]
bt ecx, eax
jae 0x459b12
push edi
call fcn.004bcbb0
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 0x459ed0
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x459b51
test edi, edi
je 0x459b44
mov dword [edi], eax
test eax, eax
setne bl
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ecef0
mov eax, ebx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, edi
shr eax, 0x15
mov byte [eax + 0x597fec], 1
jmp 0x459ac2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x5891e0
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x459c4b
mov eax, dword [0x5891e0]
jmp 0x459a89
push eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x459af9
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
cmp eax, 0x27a
jg 0x459bf1
cmp dword [ebp - 0x20], 8
je 0x459c07
cmp dword [ebp - 0x20], 0xe
je 0x459c07
mov eax, dword [0x58de2c]
mov ecx, dword [0x58a36c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x459c70
lea ebx, [ebp - 0x1c]
push dword [ebp - 0x20]
push ebx
call fcn.004b0c20
add esp, 8
movsx eax, byte [ebx + 0xb]
test eax, eax
jns 0x459bb9
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
test eax, eax
js 0x459c5a
sete cl
test ebx, ebx
setne dl
or dl, cl
je 0x459c61
push eax
push ebx
push dword [0x58de28]
call fcn.00471e30
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x459c10
push dword [ebp - 0x1c]
call fcn.004ec97e
jmp 0x459c0d
cmp dword [ebp - 0x20], 0x5af
je 0x459c07
cmp dword [ebp - 0x20], 0x27b
jne 0x459b7b
push ebx
call fcn.005426d0
add esp, 4
test esi, esi
mov eax, edi
je 0x459af9
mov eax, dword [esi]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x58ffec]
bt edx, ecx
jae 0x459c3b
push eax
call fcn.004bccd0
add esp, 4
push esi
call fcn.004ec97e
add esp, 4
mov eax, edi
jmp 0x459af9
mov dword [0x5891e0], 0
jmp 0x459a92
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 0x459c66
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 0x565ab5
call fcn.0051c8d0
push 0x58de2c
call fcn.004ec9c1
add esp, 4
cmp dword [0x58de2c], 0xffffffff
jne 0x459b9c
push 0x20
push str.create_thread_last_error
call fcn.00471df0
add esp, 8
mov dword [0x58de28], eax
push 0x58de2c
call fcn.004eca3b
add esp, 4
jmp 0x459b9c