Function at 0x422090
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b8765
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x506054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword fs:[0x2c]
mov edx, dword [eax]
mov eax, dword [0x50f3d0]
cmp eax, dword [edx + 4]
jle 0x42210c
push 0x50f3d0
call fcn.00436657
add esp, 4
cmp dword [0x50f3d0], 0xffffffff
jne 0x42210c
push 2
push 0x50f3d4
call dword [sym.imp.MSVCP140.dll__Mtx_init_in_situ]
push 0x4bea90
call fcn.00436969
push 0x50f3d0
call fcn.0043660d
add esp, 0x10
push 0x50f3d4
mov dword [ebp - 0x38], 0x50f3d4
call dword [sym.imp.MSVCP140.dll__Mtx_lock]
add esp, 4
test eax, eax
je 0x42212c
push eax
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
mov dword [ebp - 4], 0
test esi, esi
jne 0x42213e
xor bl, bl
jmp 0x422302
mov ecx, esi
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x422160
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x34]
call fcn.0040bfd0
mov byte [ebp - 4], 1
mov edi, dword [ebp - 0x24]
test edi, edi
je 0x4222ca
cmp edi, 0x30
ja 0x4222ca
mov eax, dword [0x50f204]
test eax, eax
je 0x422256
cmp eax, 3
jne 0x4222ca
push esi
push 0x50f218
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x4222c6
call fcn.00422330
cmp al, 1
jne 0x4222c6
push edi
push esi
push 0x50f218
mov dword [0x50f204], 3
mov byte [0x50ea39], al
mov byte [0x50e66e], al
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
push 4
call fcn.004364e1
mov dword [ebp - 0x1c], eax
mov dword [eax], 0x428b50
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
push ecx
push 0
push eax
push 0x42c7d0
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x28
mov dword [ebp - 0x18], eax
test eax, eax
je 0x422247
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jne 0x42222d
push 1
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push ecx
push eax
call dword [sym.imp.MSVCP140.dll__Thrd_detach]
add esp, 8
test eax, eax
je 0x4222c6
push eax
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
push 6
mov dword [ebp - 0x14], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push edi
push esi
push 0x50f218
mov dword [0x50f204], 3
mov byte [0x50ea39], 1
mov byte [0x50e66e], 1
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
push 4
call fcn.004364e1
mov dword [ebp - 0x1c], eax
mov dword [eax], 0x428b50
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
push ecx
push 0
push eax
push 0x42c7d0
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x28
mov dword [ebp - 0x18], eax
test eax, eax
je 0x422247
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jne 0x42222d
push 1
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
mov bl, 1
jmp 0x4222cc
xor bl, bl
mov ecx, dword [ebp - 0x20]
cmp ecx, 0x10
jb 0x422302
mov edx, dword [ebp - 0x34]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4222f8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4222f8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00436511
add esp, 8
push 0x50f3d4
call dword [sym.imp.MSVCP140.dll__Mtx_unlock]
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004364d3
mov esp, ebp
pop ebp
ret