Function at 0x18005a9b0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x18], r8
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb8
mov edi, dword [rcx + 0x348]
mov eax, dword [r8 + 0x10]
xor esi, esi
sub eax, dword [r8 + 0x18]
mov r12, rcx
mov ecx, dword [rcx + 0x330]
shl eax, 3
mov r13, rdx
mov ebp, esi
sub eax, dword [r8 + 0x24]
mov dword [rsp + 0x8c], edi
add eax, dword [r8 + 0xc]
cmp ecx, edi
mov dword [rsp + 0xa0], eax
mov eax, edi
cmovl eax, ecx
cmp eax, 1
jge 0x18005aa10
lea ebx, [rsi + 1]
jmp 0x18005aa17
mov ebx, edi
cmp ecx, edi
cmovl ebx, ecx
mov r14, qword [r12 + 0xc0]
shl ecx, 0xa
mov dword [rsp + 0x100], ebx
mov eax, ecx
add r14, 0x38
cdq
idiv ebx
mov dword [rsp + 0x118], eax
mov eax, edi
shl eax, 0xa
cdq
idiv ebx
mov edx, dword [r12 + 0x14]
mov dword [rsp + 0x84], edx
mov dword [rsp + 0x88], eax
mov dword [rsp + 0x80], eax
mov rax, qword [r12 + 0xc8]
lea rcx, [rax + 0x38]
mov qword [rsp + 0x98], rcx
cmp dword [rax + 0x164], esi
jne 0x18005aab6
mov eax, dword [r12 + 4]
mov r9d, dword [r12]
mov r8d, dword [r12 + 0xc]
mov edx, dword [r12 + 8]
mov dword [rsp + 0x28], 0x45
mov dword [rsp + 0x20], eax
call fcn.180054e50
mov r11, qword [r12 + 0xc8]
mov rcx, qword [rsp + 0x98]
mov dword [r11 + 0x164], 1
mov rax, qword [r12 + 0xc8]
cmp dword [rax + 0x168], esi
je 0x18005ab17
mov eax, dword [r12 + 0x6c]
mov r9, qword [r12 + 0x1f0]
mov r8, qword [r12 + 0x1d8]
mov rdx, qword [r12 + 0x1c0]
mov rcx, qword [rcx]
and eax, 4
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x30], eax
mov eax, dword [r12 + 0xc]
mov dword [rsp + 0x28], eax
mov eax, dword [r12 + 8]
mov dword [rsp + 0x20], eax
call fcn.1800551b0
mov r11, qword [r12 + 0xc8]
mov dword [r11 + 0x168], esi
mov rax, qword [r12 + 0xc0]
cmp dword [rax + 0x164], esi
jne 0x18005ab61
mov eax, dword [r12 + 4]
mov r9d, dword [r12]
mov r8d, dword [r12 + 0xc]
mov edx, dword [r12 + 8]
mov rcx, r14
mov dword [rsp + 0x28], 0x45
mov dword [rsp + 0x20], eax
call fcn.180054e50
mov r11, qword [r12 + 0xc0]
mov dword [r11 + 0x164], 1
mov rax, qword [r12 + 0xc0]
cmp dword [rax + 0x168], esi
je 0x18005abc2
mov eax, dword [r12 + 0x6c]
mov r9, qword [r12 + 0x148]
mov r8, qword [r12 + 0x118]
mov rdx, qword [r12 + 0x100]
mov rcx, qword [r14]
and eax, 4
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x30], eax
mov eax, dword [r12 + 0xc]
mov dword [rsp + 0x28], eax
mov eax, dword [r12 + 8]
mov dword [rsp + 0x20], eax
call fcn.1800551b0
mov r11, qword [r12 + 0xc0]
mov dword [r11 + 0x168], esi
mov eax, dword [r13 + 0xc]
mov dword [r13 + 0x14], 2
bt eax, 0xe
jae 0x18005abfe
bt eax, 0xd
jae 0x18005abfe
movzx eax, word [r12 + 0x14]
movzx r9d, word [r12 + 0x10]
mov r8, qword [r13 + 0x50]
movzx edx, word [r12 + 8]
lea rcx, [r13 + 0x38]
mov word [rsp + 0x20], ax
call fcn.180056840
mov qword [rsp + 0x30], rsi
mov r9d, reloc.WS2_32.dll_recv
xor r8d, r8d
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call fcn.180057f00
mov r11, qword [r12 + 0xc0]
mov eax, dword [r11 + 0x20]
mov r15d, reloc.WS2_32.dll_WSASetLastError
mov dword [r13 + 0x24], eax
mov dword [r13 + 0x20], eax
mov r8d, dword [r12 + 0x330]
test r8d, r8d
jle 0x18005af66
mov r11d, dword [rsp + 0x118]
mov r14d, dword [rsp + 0x80]
mov r15d, dword [rsp + 0x84]
mov r10d, esi
nop word [rax + rax]
mov eax, r15d
lea ecx, [r14 + 0x200]
lea esi, [r11 + 0x200]
sar ecx, 0xa
sar esi, 0xa
shl r8d, 0xa
imul eax, r10d
lea eax, [rax + rdi - 1]
add r10d, ecx
shl ecx, 0xa
cdq
mov dword [rsp + 0x108], r10d
idiv edi
mov r9d, eax
mov dword [rsp + 0x90], eax
mov eax, r10d
imul eax, r15d
lea eax, [rax + rdi - 1]
cdq
idiv edi
xor edi, edi
mov dword [rsp + 0x98], eax
sub eax, r9d
lea eax, [rax + rsi - 1]
cdq
idiv esi
movsxd r9, eax
mov eax, dword [rsp + 0x88]
sub eax, ecx
add r14d, eax
mov eax, r8d
cdq
mov dword [rsp + 0x80], r14d
idiv ebx
mov ecx, eax
mov eax, esi
shl eax, 0xa
sub ecx, eax
add r11d, ecx
mov dword [rsp + 0x118], r11d
test esi, esi
jle 0x18005adf4
mov r15d, dword [rsp + 0x90]
mov r14, r9
movsxd rbx, ebp
shl r14, 2
imul rbx, rbx, 0x70
nop
mov rcx, qword [r12 + 0x338]
mov r8, r14
xor edx, edx
mov rcx, qword [rbx + rcx + 0x28]
call fcn.18000e2e0
mov r11, qword [r12 + 0x338]
mov ecx, dword [rsp + 0x98]
mov qword [rbx + r11 + 0x68], r12
mov rax, qword [r12 + 0x338]
mov qword [rbx + rax + 8], r13
mov rax, qword [r12 + 0x338]
mov dword [rbx + rax + 0x18], edi
mov rax, qword [r12 + 0x338]
mov dword [rbx + rax + 0x1c], esi
mov rax, qword [r12 + 0x338]
mov dword [rbx + rax + 0x24], ecx
mov rax, qword [r12 + 0x338]
mov dword [rbx + rax + 0x20], r15d
lea eax, [rdi + rbp]
test al, 1
je 0x18005ad9a
mov rdx, qword [r12 + 0x120]
jmp 0x18005ada2
mov rdx, qword [r12 + 0x128]
sar eax, 1
inc edi
add rbx, 0x70
imul eax, dword [r12 + 8]
shl eax, 4
mov ecx, eax
mov rax, qword [r12 + 0x338]
add rcx, rdx
mov qword [rbx + rax - 0x60], rcx
cmp edi, esi
jl 0x18005ad20
mov ebx, dword [rsp + 0x100]
mov r10d, dword [rsp + 0x108]
mov r11d, dword [rsp + 0x118]
mov r14d, dword [rsp + 0x80]
mov r15d, dword [rsp + 0x84]
mov rdx, qword [r12 + 0x338]
mov edi, dword [rsp + 0x8c]
movsxd r8, ebp
movsxd rax, esi
add ebp, esi
add rax, r8
imul r8, r8, 0x70
imul rax, rax, 0x70
mov rcx, qword [rax + rdx - 0x48]
sub rcx, 4
mov qword [r8 + rdx + 0x30], rcx
mov r8d, dword [r12 + 0x330]
cmp ebp, r8d
jl 0x18005ac70
xor esi, esi
mov ebx, 1
lea r15d, [rsi + 0x70]
cmp r8d, ebx
jle 0x18005ae99
mov edi, r15d
nop dword [rax + rax]
movsxd r9, ebx
lea r8, [fcn.180071af0]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
imul r9, r9, 0x70
add r9, qword [r12 + 0x338]
call qword [sym.imp.KERNEL32.dll_CreateThread]
inc ebx
add rdi, 0x70
mov r11, rax
mov rax, qword [r12 + 0x338]
mov qword [rdi + rax - 0x70], r11
cmp ebx, dword [r12 + 0x330]
jl 0x18005ae50
mov rcx, qword [r12 + 0x338]
call fcn.180071af0
mov edi, 1
cmp dword [r12 + 0x330], edi
jle 0x18005aef7
mov rbx, r15
nop dword [rax + rax]
mov rcx, qword [r12 + 0x338]
or edx, 0xffffffff
mov rcx, qword [rbx + rcx]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [r12 + 0x338]
mov rcx, qword [rbx + rcx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
add rbx, 0x70
cmp edi, dword [r12 + 0x330]
jl 0x18005aec0
mov qword [r13 + 0x20], 0
cmp dword [r12 + 0x330], 0
mov r8d, esi
jle 0x18005b00d
mov r9d, esi
mov r10d, esi
mov rcx, rsi
nop word [rax + rax]
mov rax, qword [r12 + 0x338]
mov edx, dword [rcx + rax + 0x44]
cmp edx, r10d
jbe 0x18005af38
mov r10d, edx
mov dword [r13 + 0x20], edx
mov rax, qword [r12 + 0x338]
mov edx, dword [rcx + rax + 0x48]
cmp edx, r9d
jbe 0x18005af50
mov r9d, edx
mov dword [r13 + 0x24], edx
inc r8d
add rcx, 0x70
cmp r8d, dword [r12 + 0x330]
jl 0x18005af20
jmp 0x18005b00d
mov rdi, qword [r12 + 0xc0]
mov eax, dword [r12 + 0x348]
mov rsi, qword [r12 + 0xc8]
mov ebp, dword [rdi + 0x30]
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x98]
lea r8, [r12 + 0x1d8]
lea r9, [r12 + 0x1c0]
lea rcx, [r12 + 0x148]
mov qword [rsp + 0x68], rcx
lea rdx, [r12 + 0x118]
lea r10, [r12 + 0x100]
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x58], r10
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], rdi
lea r11, [r12 + 0x1f0]
mov ebx, ebp
sub ebp, dword [r13 + 0x30]
sub ebx, dword [rsi + 0x30]
mov qword [rsp + 0x40], r11
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x28], rax
mov rax, qword [rsi + 0x50]
mov r9d, ebx
mov r8d, ebp
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.1800712a0
mov r10d, dword [r12 + 0x20]
mov rcx, qword [r12 + 0xc8]
mov eax, dword [r13 + 0x30]
mov r14, qword [rsp + 0x110]
cdq
mov r9d, 1
idiv r10d
mov r8d, eax
mov dword [r13 + 0x2c], edx
mov eax, dword [rcx + 0x30]
cdq
mov rcx, r14
idiv r10d
mov rdx, r12
sub r8d, eax
mov eax, dword [r13 + 0x18]
mov dword [r13 + 0x28], r8d
mov r8, r13
mov dword [rsp + 0x20], eax
call fcn.180066a40
mov r11d, dword [rsp + 0x100]
mov edi, dword [rsp + 0x88]
xor edx, edx
lea rbp, [r13 + 0x144]
mov qword [r13 + 0x154], rdx
mov dword [r13 + 0x150], edx
mov dword [rbp], edx
mov dword [r13 + 0x160], edx
mov qword [r13 + 0x148], rdx
mov eax, dword [r12 + 0x10]
mov esi, edx
mov r10d, edx
imul eax, dword [r12 + 0x14]
mov dword [r13 + 0x158], edx
mov dword [r13 + 0x150], edx
mov dword [r13 + 0x154], eax
test r11d, r11d
jle 0x18005b25e
mov ebx, dword [rsp + 0x8c]
mov r14d, dword [rsp + 0x84]
mov r9d, edx
mov ebp, edi
nop word [rax + rax]
lea edx, [rdi + 0x200]
mov eax, ebp
sar edx, 0xa
mov ecx, edx
lea r8d, [rdx + rsi]
shl ecx, 0xa
sub eax, ecx
add edi, eax
mov rax, qword [r12 + 0x338]
mov qword [r9 + rax + 0x68], r12
mov rax, qword [r12 + 0x338]
mov qword [r9 + rax + 8], r13
mov eax, r8d
imul eax, r14d
lea eax, [rax + rbx - 1]
cdq
idiv ebx
mov ecx, eax
mov rax, qword [r12 + 0x338]
mov dword [r9 + rax + 0x24], ecx
mov eax, r14d
imul eax, esi
mov esi, r8d
lea eax, [rax + rbx - 1]
cdq
idiv ebx
mov ecx, eax
mov rax, qword [r12 + 0x338]
mov dword [r9 + rax + 0x20], ecx
test r10b, 1
je 0x18005b15e
mov rdx, qword [r12 + 0x120]
jmp 0x18005b166
mov rdx, qword [r12 + 0x128]
mov rax, qword [r12 + 0x338]
mov ecx, r10d
sar ecx, 1
imul ecx, dword [r12 + 8]
shl ecx, 4
add rcx, rdx
mov qword [r9 + rax + 0x10], rcx
test r10d, r10d
jle 0x18005b23d
mov rax, qword [r12 + 0x338]
mov r8, qword [r9 + rax + 0x58]
mov rax, qword [r8 + 0x18]
mov ebx, dword [r8 + 0x24]
mov qword [r8 + 0x10], rax
mov r11d, dword [rax]
bswap r11d
mov dword [r8], r11d
mov eax, dword [rax + 4]
bswap eax
mov dword [r8 + 4], eax
test ebx, ebx
je 0x18005b1d3
or edx, 0xffffffff
mov ecx, 0x20
sub ecx, ebx
shl edx, cl
and edx, r11d
mov dword [r8 + 8], edx
xor edx, edx
jmp 0x18005b1d9
xor edx, edx
mov dword [r8 + 8], edx
mov r11d, dword [rsp + 0x100]
mov dword [r8 + 0xc], ebx
mov rax, qword [r12 + 0x338]
mov rcx, qword [r9 + rax + 0x60]
mov ebx, dword [rsp + 0x8c]
mov dword [rcx + 0x1c], edx
mov rax, qword [r12 + 0x338]
mov rcx, qword [r9 + rax + 0x60]
mov dword [rcx + 0x14], edx
mov rax, qword [r12 + 0x338]
mov rcx, qword [r9 + rax + 0x60]
mov dword [rcx + 0x10], edx
mov rax, qword [r12 + 0x338]
mov rcx, qword [r9 + rax + 0x60]
mov dword [rcx + 0xc], edx
mov rax, qword [r12 + 0x338]
mov rcx, qword [r9 + rax + 0x60]
mov dword [rcx], edx
jmp 0x18005b23f
xor edx, edx
inc r10d
add r9, 0x70
cmp r10d, r11d
jl 0x18005b0e0
mov r14, qword [rsp + 0x110]
lea rbp, [r13 + 0x144]
cmp r11d, 1
jle 0x18005b2b8
mov rbx, r15
mov rdi, r15
lea esi, [r11 - 1]
nop
mov rax, qword [r12 + 0x338]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], edx
lea r8, [fcn.18005a5c0]
lea r9, [rdi + rax]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
add rbx, 0x70
add rdi, 0x70
dec rsi
mov r11, rax
mov rax, qword [r12 + 0x338]
mov qword [rbx + rax - 0x70], r11
mov edx, 0
jne 0x18005b270
mov rax, qword [r12 + 0x338]
mov qword [rax + 0x58], r14
mov rax, qword [r12 + 0x338]
mov qword [rax + 0x60], rbp
mov rcx, qword [r12 + 0x338]
call fcn.18005a5c0
movsxd rdi, dword [rsp + 0x100]
mov rbx, rdi
cmp rdi, 1
jle 0x18005b321
dec rbx
mov rcx, qword [r12 + 0x338]
or edx, 0xffffffff
mov rcx, qword [r15 + rcx]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [r12 + 0x338]
mov rcx, qword [r15 + rcx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add r15, 0x70
dec rbx
jne 0x18005b2f1
mov r8d, dword [r14 + 0x10]
sub r8d, dword [r14 + 0x18]
cmp dword [r14 + 0xc], 0
je 0x18005b349
mov ecx, dword [r14 + 8]
mov rax, qword [r14 + 0x10]
bswap ecx
mov dword [rax], ecx
mov ecx, dword [r14 + 0xc]
add ecx, 7
shr ecx, 3
add r8d, ecx
mov ecx, dword [r14 + 0x24]
test ecx, ecx
je 0x18005b357
shr ecx, 3
sub r8d, ecx
mov eax, dword [rsp + 0xa0]
mov r9d, edi
mov rcx, r12
cdq
and edx, 7
add eax, edx
mov rdx, r13
sar eax, 3
sub r8d, eax
mov dword [r13 + 0x140], r8d
mov r8, r14
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.180058bb0