Function at 0x40d2a0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5907d0
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ecx
mov eax, 0x112ac
call fcn.005647d0
mov eax, dword [0x5f4e24]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push 0x104
lea eax, [ebp - 0xb70]
mov dword [ebp - 0x11294], 0
mov ecx, 0x201
lea esi, [ebx + 8]
lea edi, [ebp - 0xa68]
push 0
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00565b20
add esp, 0xc
lea eax, [ebp - 0x140]
push 0x104
push 0
push eax
call fcn.00565b20
add esp, 0xc
lea eax, [ebp - 0x248]
push 0x104
push 0
push eax
call fcn.00565b20
add esp, 0xc
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0xa64]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0xb71], al
test al, al
jne 0x40d350
mov edx, 0x103
nop word [eax + eax]
cmp byte [ebp + edx - 0xb70], 0x7c
je 0x40d381
sub edx, 1
jns 0x40d370
jmp 0x40d3c8
lea ecx, [ebp - 0xb6f]
add ecx, edx
lea esi, [ebp - 0x140]
sub esi, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x40d391
cmp edx, 0x104
jae 0x40d815
mov byte [ebp + edx - 0xb70], al
xor ecx, ecx
mov al, byte [ebp + ecx - 0xb70]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x249], al
test al, al
jne 0x40d3b3
push 0x7e2
lea eax, [ebp - 0xa46]
push 0
push eax
call fcn.00565b20
mov eax, dword [0x5d5024]
lea esi, [ebp - 0xa68]
movups xmm0, xmmword [str.receiving_upload_from_jiemian]
add esp, 0xc
mov dword [ebp - 0xa4c], eax
mov ax, word [0x5d5028]
lea edi, [ebp - 0x1270]
mov word [ebp - 0xa48], ax
mov ecx, 0x201
movups xmmword [ebp - 0xa64], xmm0
lea eax, [ebp - 0x1270]
mov dword [ebp - 0xa68], 9
movq xmm0, qword [0x5d501c]
push 0
push 0x804
push eax
push dword [0x5fe554]
movq qword [ebp - 0xa54], xmm0
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.WS2_32.dll_send]
lea eax, [ebp - 0x140]
push eax
call fcn.0056b4ad
mov esi, eax
lea ecx, [ebp - 0x112ac]
add esp, 4
mov dword [ebp - 0x112b0], esi
mov edi, esi
shr edi, 0xf
mov dword [ebp - 0x11298], edi
call fcn.00430d84
mov dword [ebp - 4], 0
test esi, 0x7fff
je 0x40d48e
inc edi
mov dword [ebp - 0x11298], edi
push 0
push 0x9001
lea eax, [ebp - 0x248]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x112ac]
call fcn.0043137e
test eax, eax
je 0x40d7ec
xor esi, esi
mov dword [ebp - 0x11284], esi
cmp esi, edi
jge 0x40d7d3
push 0x8004
lea eax, [ebp - 0x11280]
push 0
push eax
call fcn.00565b20
add esp, 0xc
lea eax, [ebp - 0xa68]
push 0x804
push 0
push eax
call fcn.00565b20
lea eax, [esi + 1]
add esp, 0xc
mov dword [ebp - 0x112b8], eax
cmp eax, edi
jne 0x40d511
mov eax, edi
mov edi, dword [ebp - 0x112b0]
shl eax, 0xf
sub edi, eax
add edi, 0x8000
jmp 0x40d516
mov edi, 0x8000
mov dword [ebp - 0x112b4], edi
add edi, 4
mov dword [ebp - 0x1128c], 0
nop dword [eax]
cmp edi, 4
jbe 0x40d677
push 0x8004
lea eax, [ebp - 0x9278]
push 0
push eax
call fcn.00565b20
mov esi, dword [0x5fe554]
lea eax, [ebp - 0x11288]
add esp, 0xc
mov dword [ebp - 0x11290], esi
mov dword [ebp - 0x11288], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 0xb6c], esi
xor esi, esi
mov dword [ebp - 0xb70], 1
mov dword [ebp - 0x112c0], 3
mov dword [ebp - 0x112bc], 0
test edi, edi
jle 0x40d5f4
lea eax, [ebp - 0x112c0]
push eax
push 0
push 0
lea eax, [ebp - 0xb70]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x40d7d3
test eax, eax
je 0x40d5f4
push 0
mov eax, edi
sub eax, esi
push eax
lea eax, [ebp - 0x9278]
add eax, esi
push eax
push dword [ebp - 0x11290]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40d5f4
test eax, eax
je 0x40d5f4
add esi, eax
cmp esi, edi
jl 0x40d5a2
lea eax, [ebp - 0x11288]
mov dword [ebp - 0x11288], 0
push eax
push 0x8004667e
push dword [ebp - 0x11290]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp esi, 0xffffffff
je 0x40d7d3
test esi, esi
je 0x40d7d3
mov eax, dword [ebp - 0x9278]
cmp eax, 0x17
jne 0x40d7d3
lea eax, [esi - 4]
push eax
lea eax, [ebp - 0x9274]
push eax
mov eax, dword [ebp - 0x1128c]
lea ecx, [ebp - 0x1127c]
add eax, ecx
push eax
call fcn.005655a0
mov ecx, dword [ebp - 0x1128c]
mov eax, 4
add ecx, 0xfffffffc
sub eax, esi
add ecx, esi
add esp, 0xc
mov dword [ebp - 0x1128c], ecx
add edi, eax
jmp 0x40d530
push dword [ebp - 0x112b4]
lea eax, [ebp - 0x1127c]
push eax
lea ecx, [ebp - 0x112ac]
call fcn.00431756
lea ecx, [ebp - 0x112ac]
call fcn.0043123f
mov ecx, dword [ebp - 0x11284]
lea esi, [ebp - 0x1f]
mov dword [ebp - 0xa68], 0x18
test ecx, ecx
jns 0x40d6f8
neg ecx
mov dword [ebp - 0x11284], ecx
nop dword [eax]
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
add cl, cl
sub byte [ebp - 0x11284], cl
mov ecx, dword [ebp - 0x11284]
add cl, 0x30
mov byte [esi], cl
mov ecx, edx
mov dword [ebp - 0x11284], ecx
test ecx, ecx
jne 0x40d6c0
dec esi
mov byte [esi], 0x2d
jmp 0x40d72a
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
add cl, cl
sub byte [ebp - 0x11284], cl
mov ecx, dword [ebp - 0x11284]
add cl, 0x30
mov byte [esi], cl
mov ecx, edx
mov dword [ebp - 0x11284], ecx
test ecx, ecx
jne 0x40d6f8
push ecx
lea eax, [ebp - 0x1f]
push eax
push esi
lea ecx, [ebp - 0x260]
call fcn.0040c590
or dword [ebp - 0x11294], 3
lea ecx, [ebp - 0x260]
mov edi, dword [ebp - 0x24c]
lea edx, [ebp - 0xa64]
mov esi, dword [ebp - 0x260]
cmp edi, 0x10
cmovae ecx, esi
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x40d762
cmp edi, 0x10
jb 0x40d79f
lea ecx, [edi + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x40d795
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d81a
push ecx
push esi
call fcn.005638e9
add esp, 8
push 0
push 0x804
lea eax, [ebp - 0xa68]
push eax
push dword [0x5fe554]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x40d7ec
cmp eax, 0xffffffff
je 0x40d7ec
mov esi, dword [ebp - 0x112b8]
mov edi, dword [ebp - 0x11298]
jmp 0x40d4b5
lea ecx, [ebp - 0x112ac]
call fcn.004310d8
jmp 0x40d7ec
lea ecx, [ebp - 0x112ac]
call fcn.00430e08
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.005638db
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00563d42
call fcn.00568e05
int3