Function at 0x1400785e0
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rdi
mov eax, 0x1c90
call fcn.140232c50
sub rsp, rax
mov rax, qword [0x1402e0068]
xor rax, rsp
mov qword [rsp + 0x1c80], rax
cmp dword [rcx + 0x5c], 0
mov rbx, rcx
jne 0x140078613
mov dword [rcx + 0x5c], 2
cmp dword [rcx + 0x58], 1
je 0x140078634
mov rax, qword [rcx + 0x30]
mov dword [rcx + 0x58], 1
test rax, rax
je 0x140078634
mov r8, qword [rcx + 0x50]
mov edx, 1
call rax
xor eax, eax
lea rcx, [rsp + 0x30]
xor ebp, ebp
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rax
mov rax, qword [rbx + 0x20]
mov qword [rsp + 0x38], rax
movzx eax, word [rbx + 0x28]
xor edx, edx
mov word [rsp + 0x40], ax
movzx eax, word [rbx + 0x2a]
mov qword [rsp + 0x30], rbp
mov word [rsp + 0x42], ax
call fcn.140112e40
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x140078906
lea rax, [0x140072ed0]
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x58], rax
mov rax, qword [rbx + 0x50]
test rax, rax
je 0x1400786a6
lea rcx, [rax + 0x48]
jmp 0x1400786a9
mov rcx, rbp
mov rax, qword [rdi]
mov r9d, 0x18
mov dword [rsp + 0x28], 0x2710
mov qword [rsp + 0x20], rcx
lea r8, [rsp + 0x48]
lea edx, [r9 - 0x11]
mov rcx, rdi
call qword [rax + 0x18]
test eax, eax
jne 0x140078906
mov rcx, qword [rbx + 0x9300]
mov edi, reloc.WS2_32.dll_send
lea rdx, [rsp + 0x260]
mov r8, rdi
mov qword [rsp + 0x1cc0], r12
mov dword [rbx + 0x9308], ebp
mov qword [rsp + 0x1cc8], r13
call fcn.1400780b0
mov r12d, eax
test eax, eax
jns 0x140078714
mov r12d, ebp
jmp 0x14007871e
test eax, eax
je 0x14007871e
cmp eax, edi
cmovg r12d, edi
mov rcx, qword [rbx + 0x50]
add rcx, 0x70
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r13d, ebp
test r12d, r12d
jle 0x1400787ff
mov qword [rsp + 0x1cb8], rsi
mov r8d, dword [rbx + 0x29c8]
mov edx, 1
movsxd rax, r13d
mov ecx, edx
imul rax, rax, 0x88
lea r9, [rsp + rax + 0x260]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call fcn.1400bdca0
test eax, eax
jne 0x1400787eb
cmp dword [rbx + 0x29c8], 9
jge 0x1400787f7
cmp dword [rsp + 0x60], ebp
je 0x1400787eb
mov r9d, dword [rbx + 0x29c8]
cmp r9d, 0x14
jge 0x1400787eb
lea rsi, [rsp + 0x6c]
lea rdi, [0x1402aaac8]
mov ecx, 2
repe cmpsb byte [rsi], byte [rdi]
jne 0x1400787bf
lea r8, [0x14029fd04]
lea edx, [rax + 0x20]
lea rcx, [rsp + 0x6c]
inc r9d
call fcn.1401e8dd8
movsxd rax, dword [rbx + 0x29c8]
lea rdx, [rsp + 0x60]
mov r8d, 0x1f8
imul rax, rax, 0x1f8
lea rcx, [rax + rbx + 0x268]
call fcn.1401e75a0
inc dword [rbx + 0x29c8]
inc r13d
cmp r13d, r12d
jl 0x140078740
mov rsi, qword [rsp + 0x1cb8]
lea rcx, [rbx + 0x60]
call fcn.1400bdf70
cmp dword [rbx + 0x29c8], ebp
mov r13, qword [rsp + 0x1cc8]
mov r12, qword [rsp + 0x1cc0]
jle 0x140078871
lea rdi, [rbx + 0x268]
cmp dword [rdi], 1
jne 0x140078860
lea rdx, [rsp + 0xc80]
mov r8d, 0x1000
mov rcx, rdi
call fcn.1400be250
test eax, eax
js 0x140078860
mov rax, qword [rbx + 0x38]
test rax, rax
je 0x140078860
mov r8, qword [rbx + 0x50]
lea rdx, [rsp + 0xc80]
mov rcx, rbx
call rax
inc ebp
add rdi, 0x1f8
cmp ebp, dword [rbx + 0x29c8]
jl 0x140078827
cmp dword [rbx + 0x58], 2
je 0x140078895
mov rax, qword [rbx + 0x30]
mov dword [rbx + 0x58], 2
test rax, rax
je 0x140078895
mov r8, qword [rbx + 0x50]
mov edx, 2
mov rcx, rbx
call rax
mov rcx, qword [rbx + 0x50]
add rcx, 0x70
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbx + 0x50]
mov r9d, 1
mov rax, qword [rcx]
lea edx, [r9 + 0xb]
xor r8d, r8d
call qword [rax + 0x18]
mov rdi, qword [rbx + 0x50]
cmp qword [rdi + 0x30], 0
jne 0x140078902
mov r9, qword [rdi + 0x40]
lea rax, [rdi + 0x38]
lea r8, [0x140001050]
mov qword [rsp + 0x28], rax
mov edx, 0x10000
xor ecx, ecx
mov dword [rsp + 0x20], 0x10000
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0x30], rax
test rax, rax
je 0x140078902
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor eax, eax
jmp 0x140078909
or eax, 0xffffffff
mov rcx, qword [rsp + 0x1c80]
xor rcx, rsp
call fcn.1401e6720
add rsp, 0x1c90
pop rdi
pop rbp
pop rbx
ret