Function at 0x100223a0
Capabilities:
Get socket status
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1015f62b
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x101c2db4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x358], esi
call fcn.1003b2e0
mov ebx, eax
mov dword [ebp - 0x354], ebx
test ebx, ebx
jne 0x100223f7
push str.curl_multi_init___call_failed__download_thread_exit_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x10022784
cmp byte [esi], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0xffffffff
je 0x1002277b
push ebx
mov ecx, esi
call fcn.100227a0
nop dword [eax + eax]
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.1003b2f0
add esp, 8
cmp eax, 0xffffffff
je 0x10022430
lea eax, [ebp - 0x14]
mov dword [ebp - 0x348], 0
push eax
lea eax, [ebp - 0x138]
mov dword [ebp - 0x240], 0
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x138], 0
push eax
lea eax, [ebp - 0x348]
push eax
push ebx
call fcn.1003b0f0
add esp, 0x14
test eax, eax
jne 0x10022762
cmp dword [ebp - 0x14], 0xffffffff
jne 0x1002249d
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10022527
lea eax, [ebp - 0x28]
push eax
push ebx
call fcn.1003b5d0
mov ecx, dword [ebp - 0x28]
add esp, 8
test ecx, ecx
js 0x100224e8
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jl 0x100224d0
mov dword [ebp - 0x24], 1
jmp 0x100224e8
imul eax, eax, 0x3e8
mov dword [ebp - 0x24], 0
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x348]
push eax
mov eax, dword [ebp - 0x14]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x10022527
test eax, eax
je 0x10022527
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.1003b2f0
add esp, 8
cmp eax, 0xffffffff
je 0x10022515
lea eax, [ebp - 0x1c]
push eax
push ebx
call fcn.1003b270
mov edi, eax
add esp, 8
test edi, edi
je 0x10022752
nop
cmp dword [edi], 1
jne 0x1002273b
mov ecx, dword [esi + 0x30]
add esi, 0x30
mov dword [ebp - 0x34c], esi
mov eax, ecx
mov edx, dword [ecx + 4]
cmp byte [edx + 0xd], 0
jne 0x1002257d
mov esi, dword [edi + 4]
cmp dword [edx + 0x10], esi
jae 0x1002256d
mov edx, dword [edx + 8]
jmp 0x10022571
mov eax, edx
mov edx, dword [edx]
cmp byte [edx + 0xd], 0
je 0x10022563
mov esi, dword [ebp - 0x34c]
cmp eax, ecx
je 0x10022589
mov edx, dword [edi + 4]
cmp edx, dword [eax + 0x10]
jae 0x1002258b
mov eax, ecx
cmp eax, dword [esi]
je 0x10022735
mov ebx, dword [eax + 0x10]
xorps xmm0, xmm0
movq qword [ebp - 0x30], xmm0
mov esi, dword [eax + 0x18]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x350], ecx
test esi, esi
je 0x100225b2
lock inc dword [esi + 4]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x34c]
push eax
lea eax, [ebp - 0x36c]
mov dword [ebp - 4], 1
push eax
call fcn.10022db0
mov eax, dword [ebp - 0x350]
add eax, 0xc
mov dword [ebp - 0x34c], eax
mov ecx, dword [eax]
mov eax, dword [edi + 8]
mov dword [ecx + 0xbc], eax
lea ecx, [ebp - 0x384]
mov edx, dword [edi + 8]
call fcn.10021130
mov ecx, dword [ebp - 0x34c]
mov edx, eax
mov dword [ebp - 0x35c], edx
mov edi, dword [ecx]
add edi, 0xc0
cmp edi, edx
je 0x10022654
mov eax, dword [edi + 0x14]
cmp eax, 8
jb 0x1002262d
inc eax
mov ecx, edi
push eax
push dword [edi]
call fcn.10029250
mov edx, dword [ebp - 0x35c]
mov dword [edi + 0x14], 7
cmp dword [edi + 0x14], 8
mov dword [edi + 0x10], 0
jb 0x10022645
mov eax, dword [edi]
jmp 0x10022647
mov eax, edi
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
push edx
call fcn.10028a60
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x370]
cmp eax, 8
jb 0x10022676
inc eax
lea ecx, [ebp - 0x384]
push eax
push dword [ebp - 0x384]
call fcn.10029250
mov edi, dword [ebp - 0x350]
test ebx, ebx
je 0x10022688
push ebx
mov ecx, edi
call fcn.10021d90
cmp dword [edi + 0x3c], 0
je 0x100226e7
lea eax, [edi + 0xc]
push eax
lea ecx, [ebp - 0x368]
call fcn.10023340
mov byte [ebp - 4], 3
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x1002275d
mov eax, dword [ecx]
lea edx, [ebp - 0x368]
push edx
call dword [eax + 8]
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x364]
test edi, edi
je 0x100226e7
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x100226e7
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x100226e7
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
push ebx
push dword [ebp - 0x354]
call fcn.1003b400
push ebx
call fcn.10037a20
add esp, 0xc
mov dword [ebp - 4], 5
test esi, esi
je 0x10022728
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x10022728
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x10022728
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ebx, dword [ebp - 0x354]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x358]
lea eax, [ebp - 0x1c]
push eax
push ebx
call fcn.1003b270
mov edi, eax
add esp, 8
test edi, edi
jne 0x10022540
cmp byte [esi], 0
jne 0x10022423
jmp 0x1002277b
call fcn.100329cd
push eax
push str.curl_multi_fdset___failed__code__d._n
push 2
call fcn.101386da
add esp, 4
push eax
call fcn.10028190
add esp, 0xc
push ebx
call fcn.1003afe0
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1011480c
mov esp, ebp
pop ebp
ret