Function at 0x40c120
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 0x58cc80
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ecx
mov eax, 0x112ac
call fcn.00562d70
mov eax, dword [0x5f0e24]
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.005640c0
add esp, 0xc
lea eax, [ebp - 0x140]
push 0x104
push 0
push eax
call fcn.005640c0
add esp, 0xc
lea eax, [ebp - 0x248]
push 0x104
push 0
push eax
call fcn.005640c0
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 0x40c1d0
mov edx, 0x103
nop word [eax + eax]
cmp byte [ebp + edx - 0xb70], 0x7c
je 0x40c201
sub edx, 1
jns 0x40c1f0
jmp 0x40c248
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 0x40c211
cmp edx, 0x104
jae 0x40c695
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 0x40c233
push 0x7e2
lea eax, [ebp - 0xa46]
push 0
push eax
call fcn.005640c0
mov eax, dword [0x5d0eac]
lea esi, [ebp - 0xa68]
movups xmm0, xmmword [str.receiving_upload_from_jiemian]
add esp, 0xc
mov dword [ebp - 0xa4c], eax
mov ax, word [0x5d0eb0]
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 [0x5d0ea4]
push 0
push 0x804
push eax
push dword [0x5fa534]
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.0056992d
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.0042f903
mov dword [ebp - 4], 0
test esi, 0x7fff
je 0x40c30e
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.0042ff9c
test eax, eax
je 0x40c66c
xor esi, esi
mov dword [ebp - 0x11284], esi
cmp esi, edi
jge 0x40c653
push 0x8004
lea eax, [ebp - 0x11280]
push 0
push eax
call fcn.005640c0
add esp, 0xc
lea eax, [ebp - 0xa68]
push 0x804
push 0
push eax
call fcn.005640c0
lea eax, [esi + 1]
add esp, 0xc
mov dword [ebp - 0x112b8], eax
cmp eax, edi
jne 0x40c391
mov eax, edi
mov edi, dword [ebp - 0x112b0]
shl eax, 0xf
sub edi, eax
add edi, 0x8000
jmp 0x40c396
mov edi, 0x8000
mov dword [ebp - 0x112b4], edi
add edi, 4
mov dword [ebp - 0x1128c], 0
nop dword [eax]
cmp edi, 4
jbe 0x40c4f7
push 0x8004
lea eax, [ebp - 0x9278]
push 0
push eax
call fcn.005640c0
mov esi, dword [0x5fa534]
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 0x40c474
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 0x40c653
test eax, eax
je 0x40c474
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 0x40c474
test eax, eax
je 0x40c474
add esi, eax
cmp esi, edi
jl 0x40c422
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 0x40c653
test esi, esi
je 0x40c653
mov eax, dword [ebp - 0x9278]
cmp eax, 0x17
jne 0x40c653
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.00563b40
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 0x40c3b0
push dword [ebp - 0x112b4]
lea eax, [ebp - 0x1127c]
push eax
lea ecx, [ebp - 0x112ac]
call fcn.00430374
lea ecx, [ebp - 0x112ac]
call fcn.0042fdbe
mov ecx, dword [ebp - 0x11284]
lea esi, [ebp - 0x1f]
mov dword [ebp - 0xa68], 0x18
test ecx, ecx
jns 0x40c578
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 0x40c540
dec esi
mov byte [esi], 0x2d
jmp 0x40c5aa
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 0x40c578
push ecx
lea eax, [ebp - 0x1f]
push eax
push esi
lea ecx, [ebp - 0x260]
call fcn.0040b410
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 0x40c5e2
cmp edi, 0x10
jb 0x40c61f
lea ecx, [edi + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x40c615
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c69a
push ecx
push esi
call fcn.00561e8b
add esp, 8
push 0
push 0x804
lea eax, [ebp - 0xa68]
push eax
push dword [0x5fa534]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x40c66c
cmp eax, 0xffffffff
je 0x40c66c
mov esi, dword [ebp - 0x112b8]
mov edi, dword [ebp - 0x11298]
jmp 0x40c335
lea ecx, [ebp - 0x112ac]
call fcn.0042fc57
jmp 0x40c66c
lea ecx, [ebp - 0x112ac]
call fcn.0042f987
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.00561e7d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.005622e4
call fcn.005673a5
int3