Function at 0x140005340
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov rbp, r9
mov rsi, r8
mov rbx, rcx
test rcx, rcx
je 0x1400055c1
test edx, edx
je 0x1400055c1
test r8, r8
je 0x1400055c1
test r9, r9
je 0x1400055c1
mov rdi, qword [0x14003fe90]
test rdi, rdi
je 0x1400055c1
mov qword [rsp + 0x60], r14
mov r14, qword [rsp + 0x80]
mov qword [rsp + 0x68], r15
xor r15d, r15d
cmp byte [0x14003eae4], r15b
jne 0x140005462
mov edx, edx
lea r8, str.CC_89_0D_____________E9_____________CC_CC_CC_CC_CC
mov byte [0x14003fe78], r15b
call fcn.1400029f0
test rax, rax
je 0x14000540b
nop word [rax + rax]
mov ecx, dword [rax + 3]
lea rdx, [rax + 3]
add ecx, 4
mov r9, rbx
movsxd r8, ecx
sub r8, rbx
add r8, rdx
add r8, rsi
cmp r8, rbp
je 0x140005430
lea rbx, [rax + 0xc]
sub rax, r9
mov edx, eax
lea r8, str.CC_89_0D_____________E9_____________CC_CC_CC_CC_CC
mov rcx, rbx
call fcn.1400029f0
test rax, rax
jne 0x1400053d0
lea rcx, str.Get_patch_pattern_Fail_
call fcn.140002cd0
xor eax, eax
mov r14, qword [rsp + 0x60]
mov r15, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
lea r8, [rax + 1]
mov r9d, 1
mov rdx, r8
mov byte [r8], 0x8b
sub rdx, rbx
mov qword [rsp + 0x20], r15
add rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1400054b4
lea rcx, str.Write_Target_Patch_Fail_
jmp 0x140005412
cmp byte [0x14003fe78], r15b
je 0x1400054b4
mov edx, edx
lea r8, str.48_89_F1_E8_____________8B_3D_____________48_8B_0D
call fcn.1400029f0
test rax, rax
je 0x1400054ad
movsxd rcx, dword [rax + 0xa]
add rax, 0xe
sub rcx, rbx
add rax, rcx
add rax, rsi
mov qword [rdi + 0x10], rax
mov eax, dword [0x14003eaf4]
mov dword [rdi + 0x12c], eax
mov eax, dword [0x14003eae8]
mov dword [rdi + 0x134], eax
jmp 0x1400054b4
mov byte [0x14003fe78], r15b
lea rax, [0x14003eaf0]
mov qword [rdi + 0x18], rbp
xor edx, edx
mov qword [rdi + 8], rax
mov r9d, 0x3000
mov dword [rsp + 0x20], 0x20
mov r8d, 0x1000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rbx, rax
test rax, rax
je 0x1400055b5
mov eax, dword [rsp + 0x88]
test eax, eax
je 0x140005510
mov ecx, dword [0x14003eaec]
mov dword [rdi + 0x24], ecx
lea rcx, [rbx + 0x1f0]
mov qword [rdi + 0x38], rcx
mov dword [rdi + 0x20], eax
mov r9d, 0x300
mov qword [rsp + 0x20], r15
mov r8, rdi
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14000558c
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [rsp + 0x30], r15
lea r9, [rbx + 0x1c0]
mov dword [rsp + 0x28], r15d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], r15
mov rcx, r14
mov qword [0x14003fe90], r15
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test rax, rax
je 0x140005580
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rbx
jmp 0x140005419
lea rcx, str.Create_InGame_SyncThread_Fail_
jmp 0x140005412
lea rcx, str.Inject_shellcode_Fail_
call fcn.140002cd0
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [0x14003fe90], r15
jmp 0x140005417
lea rcx, str.Alloc_shellcode_space_Fail_
jmp 0x140005412
mov rbx, qword [rsp + 0x70]
xor eax, eax
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret