Function at 0x140002e60
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r12
push r13
push r15
sub rsp, 0x30
xor r13d, r13d
movsxd r15, r9d
mov r12, r8
mov rbp, rdx
mov rbx, rcx
cmp qword [rcx + 0xc8], r13
je 0x140002edb
nop dword [rax]
mov r11d, dword [rbx + 0xf0]
lea rdi, [rbx + 0xc8]
mov r10d, r13d
cmp r10d, r11d
jae 0x140002f53
xor edx, edx
mov eax, r10d
add rax, rbp
div r11
imul rbx, rdx, 0x1e8
add rbx, qword [rdi]
mov eax, dword [rbx + 0x17c]
cmp dword [rbx + 0x178], eax
jb 0x140002ed2
inc r10d
jmp 0x140002ea1
cmp qword [rbx + 0xc8], r13
jne 0x140002e90
mov eax, dword [rbx + 0x17c]
cmp dword [rbx + 0x178], eax
je 0x14000354e
mov r8d, r15d
mov rdx, r12
mov rcx, rbx
call fcn.1400020c0
test eax, eax
je 0x14000354e
mov rax, qword [rbx + 0x60]
test rax, rax
je 0x140002fc4
mov rcx, qword [rbx + 0x68]
mov r8d, r15d
mov rdx, r12
call rax
test eax, eax
jne 0x140002fc4
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140002fa2
mov rcx, qword [0x1400c2520]
lea r9, [0x1400ba7c8]
mov r8d, 0x99a
lea rdx, [0x1400badd0]
call qword [0x1400c2538]
int3
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140002f82
mov rcx, qword [0x1400c2520]
lea r9, str.Close_socket_failed._n
mov r8d, 0x94b
lea rdx, [0x1400baf30]
call qword [0x1400c2538]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_socket
xor eax, eax
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret
mov r8d, r15d
mov rdx, r12
mov rcx, rbx
call fcn.140002290
xor eax, eax
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret
mov edx, 0x180
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rdi, rax
test rax, rax
jne 0x140003061
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edi, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
lea rdx, str.Error_allocating_memory:__s_n
mov rcx, rbx
mov r8, rax
call fcn.14000fca0
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140003037
mov rcx, qword [0x1400c2520]
lea r9, [0x1400ba748]
mov r8d, 0x9ac
lea rdx, [0x1400bad40]
call qword [0x1400c2538]
int3
mov r8d, r15d
mov rdx, r12
mov rcx, rbx
call fcn.140002290
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], edi
xor eax, eax
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret
mov qword [rsp + 0x60], rsi
mov ecx, 0x28
mov qword [rsp + 0x68], r14
mov r14, qword [rbx + 0xd8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x14000308a
mov rsi, r13
jmp 0x1400030fd
cmp r14, 0x8000
ja 0x14000309c
mov rax, 0xffffffffffffffff
jmp 0x1400030b3
mov r9d, 4
mov r8d, 0x3000
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rcx, rsi
mov qword [rcx], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400030c9
mov eax, 1
jmp 0x1400030eb
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi], rax
test rax, rax
jne 0x1400030e8
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, r13
jmp 0x1400030fd
mov eax, r13d
mov rcx, rsi
mov dword [rcx + 0x20], eax
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], r14
mov qword [rsi + 8], r14
mov qword [rdi + 0x40], rsi
test rsi, rsi
jne 0x14000319a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
lea rdx, [0x1400ba7a8]
mov rcx, rbx
mov r8, rax
call fcn.14000fca0
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140003159
mov rcx, qword [0x1400c2520]
lea r9, [0x1400ba6c8]
mov r8d, 0x9bb
lea rdx, [0x1400bacc0]
call qword [0x1400c2538]
int3
mov r8d, r15d
mov rdx, r12
mov rcx, rbx
call fcn.140002290
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], listen
xor eax, eax
mov rsi, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret
mov rax, qword [rbx + 0x180]
mov rcx, r15
mov qword [rdi + 0x100], rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x98], rax
test rax, rax
jne 0x140003245
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov esi, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
lea rdx, [0x1400ba728]
mov rcx, rbx
mov r8, rax
call fcn.14000fca0
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140003218
mov rcx, qword [0x1400c2520]
lea r9, [0x1400ba628]
mov r8d, 0x9cf
lea rdx, [0x1400bac20]
call qword [0x1400c2538]
int3
mov r8d, r15d
mov rdx, r12
mov rcx, rbx
call fcn.140002290
mov rcx, qword [rdi + 0x40]
call fcn.14000fab0
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], esi
jmp 0x14000317c
mov r8, r15
mov rdx, r12
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
movzx eax, byte [rsp + 0x88]
mov byte [rdi + 0x118], al
mov dword [rdi + 0xf0], r15d
mov qword [rdi + 0x110], rbp
mov qword [rdi + 0x20], rbx
call fcn.14000fa70
mov qword [rdi + 0xf8], rax
mov eax, dword [rbx + 0x18c]
and eax, 2
test al, al
jne 0x14000342d
lea rax, [0x140009de0]
mov qword [rdi + 0x140], rax
lea rcx, [rbx + 0x128]
lea rax, [0x140009f30]
mov qword [rdi + 0x148], rax
lea rax, [fcn.14000a3f0]
mov qword [rdi + 0x150], rax
lea rax, [0x140002d60]
mov qword [rdi + 0x158], rax
lea rax, [0x140002dc0]
mov qword [rdi + 0x160], rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [rbx + 0x18c]
and eax, 4
test al, al
jne 0x140003314
mov rax, qword [rbx + 0x40]
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], r13
cmp qword [rbx + 0x48], r13
jne 0x140003308
mov qword [rbx + 0x48], rdi
jmp 0x140003310
mov rax, qword [rbx + 0x40]
mov qword [rax + 0x18], rdi
mov qword [rbx + 0x40], rdi
mov rax, qword [rbx + 0x10]
mov qword [rdi], rax
mov qword [rdi + 8], r13
cmp qword [rbx + 0x18], r13
jne 0x14000332b
mov qword [rbx + 0x18], rdi
jmp 0x140003333
mov rax, qword [rbx + 0x10]
mov qword [rax + 8], rdi
lea rcx, [rbx + 0x128]
mov qword [rbx + 0x10], rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rbx + 0x80]
test rax, rax
je 0x140003363
mov rcx, qword [rbx + 0x88]
lea r8, [rdi + 0x50]
xor r9d, r9d
mov rdx, rdi
call rax
mov eax, dword [rbx + 0x18c]
and eax, 4
test al, al
je 0x14000341d
mov r14, qword [rbx + 0xe8]
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x1400033f7
lea rax, [0x140002650]
mov qword [rsi + 8], rdi
mov qword [rsi], rax
lea rax, str.MHD_connection
mov qword [rsi + 0x10], rax
mov eax, 0xffffffff
cmp r14, rax
jbe 0x1400033c2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov r14d, reloc.WS2_32.dll_shutdown
mov dword [rax], r14d
jmp 0x1400033ee
mov qword [rsp + 0x28], r13
lea r8, [0x14000ffc0]
mov r9, rsi
mov dword [rsp + 0x20], r13d
mov edx, r14d
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rdi + 0xa0], rax
cmp rax, 0xffffffffffffffff
jne 0x14000341d
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov r14d, dword [rax]
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
lea rdx, str.Failed_to_create_a_thread:__s_n
mov rcx, rbx
mov r8, rax
call fcn.14000fca0
jmp 0x140003433
inc dword [rbx + 0x178]
mov eax, 1
jmp 0x14000317e
mov r14d, reloc.WS2_32.dll_shutdown
mov rax, qword [rbx + 0x80]
test rax, rax
je 0x140003455
mov rcx, qword [rbx + 0x88]
lea r8, [rdi + 0x50]
mov r9d, 1
mov rdx, rdi
call rax
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140003484
mov rcx, qword [0x1400c2520]
lea r9, [0x1400ba598]
mov r8d, 0xa76
lea rdx, [0x1400baba0]
call qword [0x1400c2538]
int3
mov r8d, r15d
mov rdx, r12
mov rcx, rbx
call fcn.140002290
lea rcx, [rbx + 0x128]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [rbx + 0x18c]
and eax, 4
test al, al
jne 0x1400034e2
mov rcx, qword [rdi + 0x18]
mov rax, qword [rdi + 0x10]
test rcx, rcx
jne 0x1400034bf
mov qword [rbx + 0x40], rax
jmp 0x1400034c3
mov qword [rcx + 0x10], rax
mov rcx, qword [rdi + 0x10]
mov rax, qword [rdi + 0x18]
test rcx, rcx
jne 0x1400034d6
mov qword [rbx + 0x48], rax
jmp 0x1400034da
mov qword [rcx + 0x18], rax
mov qword [rdi + 0x10], r13
mov qword [rdi + 0x18], r13
mov rcx, qword [rdi + 8]
mov rax, qword [rdi]
test rcx, rcx
jne 0x1400034f4
mov qword [rbx + 0x10], rax
jmp 0x1400034f7
mov qword [rcx], rax
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
test rcx, rcx
jne 0x140003509
mov qword [rbx + 0x18], rax
jmp 0x14000350d
mov qword [rcx + 8], rax
lea rcx, [rbx + 0x128]
mov qword [rdi], r13
mov qword [rdi + 8], r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rdi + 0x40]
call fcn.14000fab0
mov rcx, qword [rdi + 0x98]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], r14d
jmp 0x14000317c
lea rdx, str.Server_reached_connection_limit._Closing_inbound_connection._n
mov rcx, rbx
call fcn.14000fca0
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140002f82
mov rcx, qword [0x1400c2520]
lea r9, [0x1400ba9a8]
mov r8d, 0x987
lea rdx, [0x1400bae60]
call qword [0x1400c2538]
int3