Function at 0x140057580
Capabilities:
Create thread
Send data
Send data on socket
Send http request

Disassembly:
push rbx
push rbp
push rsi
push r12
push r13
sub rsp, 0x30
movzx esi, byte [rsp + 0x80]
mov r13, r8
movsxd r12, r9d
mov rbp, rdx
mov rbx, rcx
mov r10, qword [rbx + 0xc8]
test r10, r10
je 0x1400575b7
test sil, sil
je 0x140057d81
jmp 0x1400575c0
test sil, sil
je 0x14005764e
test r10, r10
je 0x14005764e
mov r9d, dword [rbx + 0xf0]
xor r8d, r8d
cmp r8d, r9d
jae 0x140057605
xor edx, edx
mov eax, r8d
add rax, rbp
div r9
imul rbx, rdx, 0x1e8
add rbx, r10
mov eax, dword [rbx + 0x184]
cmp dword [rbx + 0x180], eax
jb 0x140057600
inc r8d
jmp 0x1400575d3
mov sil, 1
jmp 0x1400575a0
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140057634
mov rcx, qword [0x140296808]
lea r9, str.Close_socket_failed._n
mov r8d, 0x897
lea rdx, [0x14028e8a8]
call qword [0x140296800]
int3
call fcn.140193ba0
mov esi, reloc.WS2_32.dll_socket
mov dword [rax], esi
xor eax, eax
add rsp, 0x30
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
mov eax, dword [rbx + 0x184]
cmp dword [rbx + 0x180], eax
je 0x140057d3f
mov r8d, r12d
mov rdx, r13
mov rcx, rbx
call fcn.140056900
test eax, eax
je 0x140057d3f
mov rax, qword [rbx + 0x60]
test rax, rax
je 0x1400576da
mov rcx, qword [rbx + 0x68]
mov r8d, r12d
mov rdx, r13
call rax
test eax, eax
jne 0x1400576da
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x1400576be
mov rcx, qword [0x140296808]
lea r9, [0x14028e800]
mov r8d, 0x8e6
lea rdx, [0x14028e7c8]
call qword [0x140296800]
int3
mov r8d, r12d
mov rdx, r13
mov rcx, rbx
call fcn.140056ad0
xor eax, eax
add rsp, 0x30
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
mov edx, 0x170
mov qword [rsp + 0x60], rdi
mov ecx, 1
call fcn.14019c3b0
mov rdi, rax
test rax, rax
jne 0x140057772
call fcn.140193ba0
mov edi, dword [rax]
call fcn.140193ba0
mov ecx, dword [rax]
call fcn.140193f9c
mov r8, rax
lea rdx, str.Error_allocating_memory:__s_n
mov rcx, rbx
call fcn.140061980
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x14005774a
mov rcx, qword [0x140296808]
lea r9, [0x14028e790]
mov r8d, 0x8f8
lea rdx, [0x14028e758]
call qword [0x140296800]
int3
mov r8d, r12d
mov rdx, r13
mov rcx, rbx
call fcn.140056ad0
call fcn.140193ba0
mov dword [rax], edi
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x30
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x68], r14
mov ecx, 0x28
mov qword [rsp + 0x70], r15
mov r15, qword [rbx + 0xd8]
call fcn.140192c64
mov r14, rax
test rax, rax
je 0x140057809
cmp r15, 0x8000
ja 0x1400577a7
mov rax, 0xffffffffffffffff
jmp 0x1400577be
mov r9d, 4
mov r8d, 0x3000
mov rdx, r15
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov rcx, r14
mov qword [rcx], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400577d4
mov eax, 1
jmp 0x1400577f3
mov rcx, r15
call fcn.140192c64
mov qword [r14], rax
test rax, rax
jne 0x1400577f1
mov rcx, r14
call fcn.140192488
xor r14d, r14d
jmp 0x140057809
xor eax, eax
mov rcx, r14
mov dword [rcx + 0x20], eax
mov qword [r14 + 0x10], 0
mov qword [r14 + 0x18], r15
mov qword [r14 + 8], r15
mov qword [rdi + 0x40], r14
test r14, r14
jne 0x140057885
call fcn.140193ba0
mov ecx, dword [rax]
call fcn.140193f9c
mov r8, rax
lea rdx, [0x14028e738]
mov rcx, rbx
call fcn.140061980
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x14005785f
mov rcx, qword [0x140296808]
lea r9, [0x14028e720]
mov r8d, 0x907
lea rdx, [0x14028e6e8]
call qword [0x140296800]
int3
mov r8d, r12d
mov rdx, r13
mov rcx, rbx
call fcn.140056ad0
mov rcx, rdi
call fcn.140192488
call fcn.140193ba0
mov dword [rax], recv
jmp 0x140057925
mov rax, qword [rbx + 0x188]
mov rcx, r12
mov qword [rdi + 0x108], rax
call fcn.140192c64
mov qword [rdi + 0x98], rax
test rax, rax
jne 0x140057942
call fcn.140193ba0
mov esi, dword [rax]
call fcn.140193ba0
mov ecx, dword [rax]
call fcn.140193f9c
mov r8, rax
lea rdx, [0x14028e6c8]
mov rcx, rbx
call fcn.140061980
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x1400578ff
mov rcx, qword [0x140296808]
lea r9, [0x14028e6b0]
mov r8d, 0x91b
lea rdx, [0x14028e678]
call qword [0x140296800]
int3
mov r8d, r12d
mov rdx, r13
mov rcx, rbx
call fcn.140056ad0
mov rcx, qword [rdi + 0x40]
call fcn.140061790
mov rcx, rdi
call fcn.140192488
call fcn.140193ba0
mov dword [rax], esi
xor eax, eax
mov r14, qword [rsp + 0x68]
mov r15, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x60]
add rsp, 0x30
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
mov r8, r12
mov rdx, r13
mov rcx, rax
call fcn.14018af60
movzx eax, byte [rsp + 0x88]
mov byte [rdi + 0x120], al
mov dword [rdi + 0xf8], r12d
mov qword [rdi + 0x118], rbp
mov qword [rdi + 0x20], rbx
call fcn.140061750
mov qword [rdi + 0x100], rax
mov eax, dword [rbx + 0x194]
and eax, 2
test al, al
jne 0x140057bcc
lea rax, [0x14005c290]
mov qword [rdi + 0x148], rax
lea rcx, [rbx + 0x130]
lea rax, [0x14005c310]
mov qword [rdi + 0x150], rax
call qword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [rbx + 0x180]
cmp eax, dword [rbx + 0x184]
jb 0x1400579ea
lea rcx, [rbx + 0x130]
call qword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
lea rdx, [0x14028e638]
mov rcx, rbx
call fcn.140061980
mov esi, reloc.WS2_32.dll_socket
jmp 0x140057bd1
inc eax
mov dword [rbx + 0x180], eax
mov eax, dword [rbx + 0x194]
and eax, 4
test al, al
jne 0x140057a3e
cmp qword [rdi + 0x10], 0
jne 0x140057dcb
cmp qword [rdi + 0x18], 0
jne 0x140057e15
mov rax, qword [rbx + 0x40]
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], 0
cmp qword [rbx + 0x48], 0
jne 0x140057a32
mov qword [rbx + 0x48], rdi
jmp 0x140057a3a
mov rax, qword [rbx + 0x40]
mov qword [rax + 0x18], rdi
mov qword [rbx + 0x40], rdi
cmp qword [rdi], 0
jne 0x140057e5f
cmp qword [rdi + 8], 0
jne 0x140057ea9
mov rax, qword [rbx + 0x10]
mov qword [rdi], rax
mov qword [rdi + 8], 0
cmp qword [rbx + 0x18], 0
jne 0x140057a6f
mov qword [rbx + 0x18], rdi
jmp 0x140057a77
mov rax, qword [rbx + 0x10]
mov qword [rax + 8], rdi
lea rcx, [rbx + 0x130]
mov qword [rbx + 0x10], rdi
call qword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov rax, qword [rbx + 0x80]
test rax, rax
je 0x140057aa7
mov rcx, qword [rbx + 0x88]
lea r8, [rdi + 0x50]
xor r9d, r9d
mov rdx, rdi
call rax
mov eax, dword [rbx + 0x194]
and eax, 4
test al, al
je 0x140057b5d
mov r15, qword [rbx + 0xe8]
mov ecx, 0x18
call fcn.140192c64
mov r14, rax
test rax, rax
je 0x140057b3b
lea rax, [0x140056e60]
mov qword [r14 + 8], rdi
mov qword [r14], rax
lea rax, str.MHD_connection
mov qword [r14 + 0x10], rax
mov eax, 0xffffffff
cmp r15, rax
jbe 0x140057b01
call fcn.140193ba0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x140057b33
mov qword [rsp + 0x28], 0
lea r8, [0x140061ce0]
mov r9, r14
mov dword [rsp + 0x20], 0
mov edx, r15d
xor ecx, ecx
call fcn.14019ea44
mov qword [rdi + 0xa0], rax
cmp rax, 0xffffffffffffffff
jne 0x140057b6b
mov rcx, r14
call fcn.140192488
call fcn.140193ba0
mov esi, dword [rax]
mov ecx, esi
call fcn.140193f9c
mov r8, rax
lea rdx, str.Failed_to_create_a_thread:__s_n
mov rcx, rbx
call fcn.140061980
jmp 0x140057bd1
movups xmm0, xmmword [rbx + 0xf8]
movups xmmword [rdi + 0xa0], xmm0
mov eax, dword [rbx + 0x194]
and eax, 4
test al, al
jne 0x140057bc2
test sil, sil
je 0x140057bc2
cmp qword [rbx + 0x168], 0xffffffffffffffff
je 0x140057bc2
mov rcx, qword [rbx + 0x170]
lea rdx, [0x14028bc3c]
xor r9d, r9d
lea r8d, [r9 + 1]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x140057bc2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140057bc2
lea rdx, str.Failed_to_signal_new_connection_via_inter_thread_communication_channel.
mov rcx, rbx
call fcn.140061980
mov eax, 1
jmp 0x140057927
mov esi, reloc.WS2_32.dll_shutdown
mov rax, qword [rbx + 0x80]
test rax, rax
je 0x140057bf3
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 0x140057c22
mov rcx, qword [0x140296808]
lea r9, [0x14028e388]
mov r8d, 0x9db
lea rdx, [0x14028e2f8]
call qword [0x140296800]
int3
mov r8d, r12d
mov rdx, r13
mov rcx, rbx
call fcn.140056ad0
lea rcx, [rbx + 0x130]
call qword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [rbx + 0x194]
and eax, 4
test al, al
jne 0x140057cac
mov rax, qword [rdi + 0x10]
test rax, rax
jne 0x140057c5d
cmp rdi, qword [rbx + 0x48]
jne 0x140057ef3
mov rcx, qword [rdi + 0x18]
test rcx, rcx
jne 0x140057c7b
cmp rdi, qword [rbx + 0x40]
jne 0x140057f3d
test rcx, rcx
jne 0x140057c7b
mov qword [rbx + 0x40], rax
jmp 0x140057c7f
mov qword [rcx + 0x10], rax
mov rcx, qword [rdi + 0x10]
mov rax, qword [rdi + 0x18]
test rcx, rcx
jne 0x140057c9c
xor edx, edx
mov qword [rbx + 0x48], rax
mov qword [rdi + 0x10], rdx
mov qword [rdi + 0x18], rdx
jmp 0x140057cae
xor edx, edx
mov qword [rcx + 0x18], rax
mov qword [rdi + 0x10], rdx
mov qword [rdi + 0x18], rdx
jmp 0x140057cae
xor edx, edx
mov rax, qword [rdi]
test rax, rax
jne 0x140057cc0
cmp rdi, qword [rbx + 0x18]
jne 0x140057f87
mov rcx, qword [rdi + 8]
test rcx, rcx
jne 0x140057cde
cmp rdi, qword [rbx + 0x10]
jne 0x140057fd1
test rcx, rcx
jne 0x140057cde
mov qword [rbx + 0x10], rax
jmp 0x140057ce1
mov qword [rcx], rax
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
test rcx, rcx
jne 0x140057cf3
mov qword [rbx + 0x18], rax
jmp 0x140057cf7
mov qword [rcx + 8], rax
lea rcx, [rbx + 0x130]
mov qword [rdi], rdx
mov qword [rdi + 8], rdx
call qword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov rcx, qword [rdi + 0x40]
call fcn.140061790
mov rcx, qword [rdi + 0x98]
call fcn.140192488
mov rcx, rdi
call fcn.140192488
call fcn.140193ba0
test esi, esi
jne 0x140057923
mov esi, reloc.WS2_32.dll_shutdown
jmp 0x140057923
lea rdx, str.Server_reached_connection_limit._Closing_inbound_connection._n
mov rcx, rbx
call fcn.140061980
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x140057634
mov rcx, qword [0x140296808]
lea r9, [0x14028e850]
mov r8d, 0x8d3
lea rdx, [0x14028e818]
call qword [0x140296800]
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e928]
lea rax, str._NULL__daemon__worker_pool____external_add_
mov r9d, 0x884
lea rdx, [0x14028e8f8]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e5e0]
lea rax, str.NULL___connection___nextX
mov r9d, 0x982
lea rdx, [0x14028e5b0]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e558]
lea rax, str.NULL___connection___prevX
mov r9d, 0x982
lea rdx, [0x14028e528]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e4d0]
lea rax, [0x14028e508]
mov r9d, 0x986
lea rdx, [0x14028e4a0]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e448]
lea rax, str.NULL___connection___prev
mov r9d, 0x986
lea rdx, [0x14028e418]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e238]
lea rax, [0x14028e330]
mov r9d, 0x9e4
lea rdx, [0x14028e2c8]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e200]
lea rax, [0x14028e270]
mov r9d, 0x9e4
lea rdx, [0x14028e1d0]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e0c8]
lea rax, [0x14028e180]
mov r9d, 0x9e8
lea rdx, [0x14028e150]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
lea r8, [0x14028e008]
lea rax, [0x14028e100]
mov r9d, 0x9e8
lea rdx, [0x14028e098]
mov qword [rsp + 0x20], rax
call fcn.140004fd0
mov ecx, 2
call fcn.1401925bc
mov rcx, rax
call fcn.140191344
call fcn.14019c3b8
int3