Function at 0x140048e20
Capabilities:
Create thread

Disassembly:
push rbx
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [rcx + 0x70]
xor r15d, r15d
lea r14, [rcx + 0x60]
mov rbx, qword [rax + 0x20]
movzx eax, byte [rcx + 0x5c]
mov r13, rcx
cmp al, 1
mov qword [rsp + 0xa0], r15
jne 0x140048e59
lea r8, [0x140041e10]
jmp 0x140048e6d
lea r8, [0x140042160]
lea rcx, [0x140041fa0]
cmp al, 2
cmove r8, rcx
mov ecx, r15d
cmp byte [r13 + 0x5b], cl
jbe 0x140048e93
lea rdx, [r13 + 0xa0]
nop
mov qword [rdx], r8
movzx eax, byte [r13 + 0x5b]
add ecx, 1
add rdx, 0x68
cmp ecx, eax
jl 0x140048e80
mov qword [rsp + 0x68], rbp
lea rdx, [rsp + 0xa0]
mov rcx, r13
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], rdi
call fcn.14002a980
test eax, eax
mov r12d, eax
jne 0x140048fb9
cmp byte [r13 + 0x59], r15b
je 0x140049637
movzx eax, byte [r13 + 0x5b]
sub eax, 1
movsxd rcx, eax
imul rcx, rcx, 0x68
lea rsi, [rcx + r13 + 0x60]
mov rcx, rsi
call fcn.14001d800
test eax, eax
mov r12d, eax
jne 0x140048fb9
test rbx, rbx
je 0x140048f09
cmp byte [rbx + 0x51], r15b
je 0x140048f09
mov rax, r15
mov qword [rsp + 0xb8], rax
jmp 0x140048fa8
cmp dword [0x1400bf010], r15d
je 0x140048f6c
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x140048f24
call qword [0x1400bf098]
lea rdx, [rsp + 0xa8]
mov ecx, 0x50
call fcn.140011830
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x140048f5a
call qword [0x1400bf0a8]
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0xb8], rax
jmp 0x140048f7f
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0xb8], rax
jmp 0x140048f7f
mov ecx, 0x50
call qword [0x1400bf038]
mov qword [rsp + 0xb8], rax
test rax, rax
jne 0x140048f8d
test rbx, rbx
je 0x140048f8d
mov byte [rbx + 0x51], 1
test rax, rax
je 0x140048fa8
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x50]
call sub.msvcrt.dll_memset
mov rax, qword [rsp + 0xb8]
test rax, rax
mov qword [r13 + 0x10], rax
jne 0x140049059
lea r12d, [rax + 7]
mov rsi, qword [rsp + 0xa0]
test rsi, rsi
je 0x140049a99
cmp dword [rsi], r15d
jle 0x140049a3d
mov rbp, r15
nop
nop
nop
mov rbx, qword [rsi + 0x18]
add rbx, rbp
mov rdi, qword [rbx + 0x20]
test rdi, rdi
je 0x140049998
cmp dword [0x1400bf010], 0
je 0x140049986
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x140049013
call qword [0x1400bf098]
mov rcx, rdi
call qword [0x1400bf050]
sub qword [0x1400c5018], 1
mov rcx, rdi
movsxd rdx, eax
sub qword [0x1400c4fd0], rdx
call qword [0x1400bf040]
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x14004999f
call qword [0x1400bf0a8]
mov rcx, qword [0x1400c52b8]
jmp 0x14004999f
mov rdi, qword [rsp + 0xa0]
lea rbp, [rax + 0x48]
mov rcx, rsi
mov rdx, rdi
mov r8, rbp
call fcn.1400186b0
test eax, eax
mov r11d, eax
jne 0x14004911c
mov rcx, qword [rbp]
mov r9d, r15d
mov rdx, qword [rcx]
mov dword [rcx + 0x20], 1
movsxd rcx, dword [rcx + 0x18]
sub qword [rdx + 0x60], rcx
movzx ecx, byte [r13 + 0x5b]
sub ecx, 1
test ecx, ecx
jle 0x1400490e5
mov r8, r15
nop
nop
nop
mov rax, qword [rdi + 0x18]
mov rdx, qword [r8 + rax + 0x48]
test rdx, rdx
je 0x1400490d0
mov rcx, qword [rdx]
movsxd rax, dword [rdx + 0x18]
mov dword [rdx + 0x20], 1
sub qword [rcx + 0x60], rax
movzx eax, byte [r13 + 0x5b]
add r9d, 1
add r8, 0x50
sub eax, 1
cmp r9d, eax
jl 0x1400490b0
mov ebx, r15d
nop
nop
movzx eax, byte [r13 + 0x5b]
cmp ebx, eax
jge 0x14004911c
movsxd rax, ebx
mov edx, 1
lea rcx, [rax + rax*4]
shl rcx, 4
add rcx, qword [rdi + 0x18]
call fcn.14002dbe0
add ebx, 1
test eax, eax
mov r11d, eax
je 0x1400490f0
test r11d, r11d
jne 0x14004962f
mov r12, qword [rbp]
mov r13, r15
mov rcx, qword [r12]
mov qword [rsp + 0x30], r12
mov r12, qword [r12 + 8]
mov rax, qword [rcx + 0x10]
movsxd r14, dword [r12]
mov qword [rsp + 0xb0], rcx
test r14, r14
mov rax, qword [rax + 0x20]
mov qword [r12 + 8], rcx
mov qword [rsp + 0x38], rax
jle 0x1400492b7
lea rbp, [r14 + r14*4]
shl rbp, 4
nop
nop
mov rax, qword [r12 + 0x18]
mov edi, r15d
mov qword [rsp + 0xa0], r15
lea rsi, [rax + rbp - 0x50]
mov rax, qword [rax + rbp - 0x48]
cmp qword [rsi], rax
jl 0x140049269
mov rbx, qword [rsi + 0x48]
test rbx, rbx
je 0x1400492ef
cmp dword [rbx + 0x20], r15d
je 0x14004920f
mov rcx, qword [rbx]
call fcn.140012280
test eax, eax
mov edi, eax
jne 0x14004923a
mov rax, qword [rbx + 0x28]
lea rcx, [rsp + 0x40]
mov qword [rcx], rax
mov rax, qword [rbx + 0x30]
mov qword [rcx + 8], rax
mov rax, qword [rbx + 0x38]
lea rcx, [rsp + 0x40]
mov qword [rbx + 0x28], rax
mov rax, qword [rbx + 0x40]
mov qword [rbx + 0x30], rax
mov rax, qword [rcx]
mov qword [rbx + 0x38], rax
mov rax, qword [rcx + 8]
mov qword [rbx + 0x40], rax
mov rax, qword [rbx + 0x10]
cmp qword [rbx + 0x30], rax
jne 0x140049203
mov dword [rbx + 0x1c], 1
jmp 0x14004923a
mov rcx, rbx
call fcn.1400211a0
mov edi, eax
jmp 0x14004923a
mov rcx, rbx
call fcn.140018950
mov edi, eax
mov rax, qword [rbx + 0x38]
mov qword [rbx + 0x28], rax
mov rax, qword [rbx + 0x40]
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x10]
cmp qword [rbx + 0x30], rax
jne 0x14004923a
mov dword [rbx + 0x1c], 1
test edi, edi
jne 0x1400492ef
cmp dword [rbx + 0x1c], r15d
jne 0x1400492ef
mov r9, qword [rbx + 0x10]
mov rcx, qword [rbx]
lea r8, [rbx + 0x28]
mov rdx, rsi
call fcn.140014820
test eax, eax
mov edi, eax
jne 0x1400493fd
lea rdx, [rsp + 0xa0]
mov rcx, rsi
call fcn.14001dd60
test eax, eax
mov edi, eax
jne 0x1400493fd
mov rax, qword [rsp + 0xa0]
lea r8, [rsi + 0x28]
mov rcx, rsi
mov edx, eax
mov dword [rsi + 0x14], eax
call fcn.140019470
mov edi, eax
test edi, edi
jne 0x1400493fd
add r13, 1
sub rbp, 0x50
cmp r13, r14
jl 0x140049170
mov ebp, dword [r12]
sub ebp, 1
test ebp, ebp
movsxd rdi, ebp
jle 0x140049497
nop
nop
mov eax, dword [r12]
cdq
sub eax, edx
sar eax, 1
cmp ebp, eax
jl 0x14004940a
mov ebx, ebp
sub ebx, eax
add ebx, ebx
lea esi, [rbx + 1]
jmp 0x140049416
mov rbx, qword [rsi + 0x20]
test rbx, rbx
je 0x140049364
cmp dword [0x1400bf010], r15d
je 0x140049352
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x140049313
call qword [0x1400bf098]
mov rcx, rbx
call qword [0x1400bf050]
sub qword [0x1400c5018], 1
mov rcx, rbx
movsxd rdx, eax
sub qword [0x1400c4fd0], rdx
call qword [0x1400bf040]
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x14004936b
call qword [0x1400bf0a8]
mov rcx, qword [0x1400c52b8]
jmp 0x14004936b
mov rcx, rbx
call qword [0x1400bf040]
mov rcx, qword [0x1400c52b8]
jmp 0x14004936b
mov rcx, qword [0x1400c52b8]
mov rbx, qword [rsi + 0x30]
test rbx, rbx
je 0x1400493c9
cmp dword [0x1400bf010], r15d
je 0x1400493c0
test rcx, rcx
je 0x140049388
call qword [0x1400bf098]
mov rcx, rbx
call qword [0x1400bf050]
sub qword [0x1400c5018], 1
mov rcx, rbx
movsxd rdx, eax
sub qword [0x1400c4fd0], rdx
call qword [0x1400bf040]
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x1400493c9
call qword [0x1400bf0a8]
jmp 0x1400493c9
mov rcx, rbx
call qword [0x1400bf040]
mov r8, qword [rsi + 0x40]
test r8, r8
je 0x1400493e1
mov rcx, qword [rsi + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov rcx, qword [rsi + 0x48]
call fcn.1400144b0
xor edx, edx
mov rcx, rsi
lea r8d, [rdx + 0x50]
call sub.msvcrt.dll_memset
jmp 0x14004929e
mov r12, qword [rsp + 0xb0]
jmp 0x1400494a8
mov rax, qword [r12 + 0x10]
mov ebx, dword [rax + rdi*8]
mov esi, dword [rax + rdi*8 + 4]
mov rcx, qword [r12 + 0x18]
movsxd rax, ebx
lea r8, [rax + rax*4]
movsxd rax, esi
lea rdx, [rax + rax*4]
add r8, r8
add rdx, rdx
cmp qword [rcx + r8*8 + 0x18], r15
je 0x14004947e
cmp qword [rcx + rdx*8 + 0x18], r15
jne 0x140049441
mov esi, ebx
jmp 0x14004947e
mov eax, dword [rcx + rdx*8 + 0x14]
mov r9d, dword [rcx + r8*8 + 0x14]
mov r10, qword [r12 + 8]
mov r8, qword [rcx + r8*8 + 0x28]
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + rdx*8 + 0x28]
lea rdx, [rsp + 0xa8]
mov rcx, r10
mov qword [rsp + 0x20], rax
mov dword [rsp + 0xa8], r15d
call qword [r10 + 0x40]
test eax, eax
cmovle esi, ebx
mov rax, qword [r12 + 0x10]
sub rdi, 1
sub ebp, 1
test rdi, rdi
mov dword [rax + rdi*4 + 4], esi
jg 0x1400492d0
mov r12, qword [rsp + 0xb0]
mov rax, qword [r12 + 0x18]
movzx edi, byte [rax + 0xb]
test edi, edi
jne 0x140049628
mov rbp, qword [rsp + 0x30]
cmp dword [rbp + 0x20], r15d
movsxd rsi, dword [rbp + 0x18]
je 0x1400495c8
mov r12, qword [rsp + 0x38]
lea rax, [rsp + 0xa0]
lea r8, [rbp + 0x28]
mov rcx, qword [r12]
mov r9d, 0x101e
xor edx, edx
mov qword [rsp + 0x20], rax
call fcn.140016370
test eax, eax
mov edi, eax
mov dword [rsp + 0xa0], eax
jne 0x1400495ad
mov rcx, qword [rbp + 0x28]
mov qword [rsp + 0x40], 0x7fff0000
lea r8, [rsp + 0x40]
mov rax, qword [rcx]
lea edx, [rdi + 0x12]
call qword [rax + 0x50]
test rsi, rsi
jle 0x1400495a6
movsxd rax, dword [r12 + 0x98]
mov rbx, qword [rbp + 0x28]
mov qword [rsp + 0x30], rsi
cmp rsi, rax
jg 0x1400495a6
mov rax, qword [rbx]
cmp dword [rax], 3
jl 0x1400495a6
lea r8, [rsp + 0xb0]
lea edx, [rdi + 6]
mov rcx, rbx
mov qword [rsp + 0x38], r15
mov dword [rsp + 0xb0], 0x1000
call qword [rax + 0x50]
mov r11, qword [rbx]
lea r8, [rsp + 0x30]
lea edx, [rdi + 5]
mov rcx, rbx
call qword [r11 + 0x50]
mov r11, qword [rbx]
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x38]
xor edx, edx
mov rcx, rbx
call qword [r11 + 0x88]
mov r11, qword [rbx]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, rbx
call qword [r11 + 0x90]
mov edi, dword [rsp + 0xa0]
jmp 0x1400495ad
mov edi, dword [rsp + 0xa0]
test edi, edi
jne 0x140049628
lea r8, [rbp + 0x38]
mov rdx, rsi
mov rcx, r12
call fcn.140018d50
test eax, eax
mov edi, eax
jne 0x140049628
jmp 0x140049605
cmp qword [r12 + 0x58], r15
jne 0x1400495ee
mov rdx, qword [r12 + 0x60]
mov rcx, qword [rsp + 0x38]
lea r8, [r12 + 0x58]
call fcn.140018d50
mov qword [r12 + 0x60], r15
test eax, eax
mov edi, eax
jne 0x140049628
mov rax, qword [r12 + 0x58]
mov qword [rbp + 0x38], rax
mov rax, qword [r12 + 0x60]
mov qword [rbp + 0x10], rax
add qword [r12 + 0x60], rsi
cmp dword [rbp + 0x20], r15d
je 0x140049619
mov rcx, rbp
call fcn.140018950
test eax, eax
mov edi, eax
jne 0x140049628
mov rcx, qword [rsp + 0xb8]
call fcn.140023990
mov edi, eax
mov eax, edi
jmp 0x140049a9c
mov eax, r11d
jmp 0x140049a9c
mov r12, qword [rsp + 0xa0]
mov rbp, r15
mov qword [rsp + 0xb8], r15
movsxd rax, dword [r12]
mov qword [r12 + 8], r14
test rax, rax
mov qword [rsp + 0x38], rax
jle 0x1400498b7
mov r14, r15
mov qword [rsp + 0xa8], r15
mov dword [rsp + 0xa0], 7
nop
nop
nop
mov rax, qword [r12 + 0x18]
mov rbx, qword [r14 + rax + 0x48]
test rbx, rbx
lea rsi, [r14 + rax]
je 0x140049890
cmp dword [rbx + 0x20], r15d
je 0x1400497b2
mov rdi, qword [rbx]
mov qword [rdi], r15
cmp dword [0x1400bf010], r15d
je 0x1400496fa
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x1400496c2
call qword [0x1400bf098]
lea rdx, [rsp + 0xb0]
mov ecx, 0x28
call fcn.140011830
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x1400496f0
call qword [0x1400bf0a8]
mov rbx, qword [rsp + 0xb0]
jmp 0x140049710
mov rbx, qword [rsp + 0xb0]
jmp 0x140049710
mov ecx, 0x28
call qword [0x1400bf038]
mov rbx, rax
mov qword [rsp + 0xb0], rax
test rbx, rbx
jne 0x140049721
mov eax, dword [rsp + 0xa0]
jmp 0x140049888
cmp dword [0x1400bf014], r15d
jne 0x140049741
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
jmp 0x14004978c
lea rax, [fcn.14002b040]
lea r8, [0x140008520]
mov r9, rbx
mov qword [rbx + 0x10], rax
lea rax, [rbx + 8]
xor edx, edx
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov qword [rbx + 0x18], rsi
mov dword [rsp + 0x20], r15d
call sub.msvcrt.dll__beginthreadex
test rax, rax
mov qword [rbx], rax
jne 0x14004978c
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
cmp qword [rbx + 0x10], r15
jne 0x1400497a7
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, rsi
mov dword [rbx + 8], eax
call fcn.14002b040
mov qword [rbx + 0x20], rax
mov qword [rdi], rbx
mov eax, r15d
jmp 0x140049888
mov rdi, qword [rbx]
mov rdx, qword [rbx + 8]
xor r8d, r8d
mov rax, qword [rdi + 0x10]
mov rcx, rdi
mov rbp, qword [rax + 0x20]
call fcn.140025000
test eax, eax
jne 0x140049880
cmp dword [rbx + 0x20], r15d
movsxd r14, dword [rbx + 0x18]
je 0x14004980e
lea r8, [rbx + 0x28]
mov rdx, r14
mov rcx, rbp
call fcn.140018d50
test eax, eax
jne 0x140049864
lea r8, [rbx + 0x38]
mov rdx, r14
mov rcx, rbp
call fcn.140018d50
test eax, eax
je 0x140049840
mov r14, qword [rsp + 0xa8]
jmp 0x140049880
cmp qword [rdi + 0x58], r15
jne 0x14004982c
mov rdx, qword [rdi + 0x60]
lea r8, [rdi + 0x58]
mov rcx, rbp
call fcn.140018d50
mov qword [rdi + 0x60], r15
test eax, eax
jne 0x14004986e
mov rax, qword [rdi + 0x58]
mov qword [rbx + 0x38], rax
mov rax, qword [rdi + 0x60]
mov qword [rbx + 0x10], rax
add qword [rdi + 0x60], r14
cmp dword [rbx + 0x20], r15d
je 0x140049852
mov rcx, rbx
call fcn.140018950
test eax, eax
jne 0x140049878
mov rcx, rsi
call fcn.140023990
mov r14, qword [rsp + 0xa8]
jmp 0x140049880
mov r14, qword [rsp + 0xa8]
jmp 0x140049880
mov r14, qword [rsp + 0xa8]
jmp 0x140049880
mov r14, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0xb8]
test eax, eax
jne 0x14004997d
add rbp, 1
add r14, 0x50
cmp rbp, qword [rsp + 0x38]
mov qword [rsp + 0xb8], rbp
mov qword [rsp + 0xa8], r14
jl 0x140049680
lea r14, [r13 + 0x60]
mov ebp, dword [r12]
sub ebp, 1
test ebp, ebp
movsxd rdi, ebp
jle 0x140049975
nop
nop
mov eax, dword [r12]
cdq
sub eax, edx
sar eax, 1
cmp ebp, eax
jl 0x1400498e8
mov ebx, ebp
sub ebx, eax
add ebx, ebx
lea esi, [rbx + 1]
jmp 0x1400498f4
mov rax, qword [r12 + 0x10]
mov ebx, dword [rax + rdi*8]
mov esi, dword [rax + rdi*8 + 4]
mov rcx, qword [r12 + 0x18]
movsxd rax, ebx
lea r8, [rax + rax*4]
movsxd rax, esi
lea rdx, [rax + rax*4]
add r8, r8
add rdx, rdx
cmp qword [rcx + r8*8 + 0x18], r15
je 0x14004995c
cmp qword [rcx + rdx*8 + 0x18], r15
jne 0x14004991f
mov esi, ebx
jmp 0x14004995c
mov eax, dword [rcx + rdx*8 + 0x14]
mov r9d, dword [rcx + r8*8 + 0x14]
mov r10, qword [r12 + 8]
mov r8, qword [rcx + r8*8 + 0x28]
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + rdx*8 + 0x28]
lea rdx, [rsp + 0xa0]
mov rcx, r10
mov qword [rsp + 0x20], rax
mov dword [rsp + 0xa0], r15d
call qword [r10 + 0x40]
test eax, eax
cmovle esi, ebx
mov rax, qword [r12 + 0x10]
sub rdi, 1
sub ebp, 1
test rdi, rdi
mov dword [rax + rdi*4 + 4], esi
jg 0x1400498d0
mov rax, qword [r14 + 0x18]
movzx eax, byte [rax + 0xb]
mov qword [r13 + 0x18], r12
jmp 0x140049a9c
mov rcx, rdi
call qword [0x1400bf040]
mov rcx, qword [0x1400c52b8]
jmp 0x14004999f
mov rcx, qword [0x1400c52b8]
mov rdi, qword [rbx + 0x30]
test rdi, rdi
je 0x1400499fd
cmp dword [0x1400bf010], 0
je 0x1400499f4
test rcx, rcx
je 0x1400499bc
call qword [0x1400bf098]
mov rcx, rdi
call qword [0x1400bf050]
sub qword [0x1400c5018], 1
mov rcx, rdi
movsxd rdx, eax
sub qword [0x1400c4fd0], rdx
call qword [0x1400bf040]
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x1400499fd
call qword [0x1400bf0a8]
jmp 0x1400499fd
mov rcx, rdi
call qword [0x1400bf040]
mov r8, qword [rbx + 0x40]
test r8, r8
je 0x140049a15
mov rcx, qword [rbx + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov rcx, qword [rbx + 0x48]
call fcn.1400144b0
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x50]
call sub.msvcrt.dll_memset
add r15d, 1
add rbp, 0x50
cmp r15d, dword [rsi]
jl 0x140048fe0
cmp dword [0x1400bf010], 0
je 0x140049a90
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x140049a58
call qword [0x1400bf098]
mov rcx, rsi
call qword [0x1400bf050]
sub qword [0x1400c5018], 1
mov rcx, rsi
movsxd rdx, eax
sub qword [0x1400c4fd0], rdx
call qword [0x1400bf040]
mov rcx, qword [0x1400c52b8]
test rcx, rcx
je 0x140049a99
call qword [0x1400bf0a8]
jmp 0x140049a99
mov rcx, rsi
call qword [0x1400bf040]
mov eax, r12d
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rbx
ret