Function at 0x41f970
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x5e183e
mov eax, dword fs:[0]
push eax
sub esp, 0x144
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x13c], eax
push ebx
push esi
push edi
mov eax, dword [0x658aa8]
xor eax, esp
push eax
lea eax, [esp + 0x154]
mov dword fs:[0], eax
push 0x637908
lea ecx, [esp + 0x1c]
mov dword [esp + 0x160], 0
mov byte [esp + 0x1b], 0
call fcn.00413e80
mov ebx, 1
mov byte [esp + 0x15c], bl
mov eax, dword [esp + 0x164]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov esi, esp
push eax
call fcn.00403e60
add eax, 0x10
mov dword [esi], eax
lea eax, [esp + 0x28]
add esp, 4
push eax
call fcn.0041f800
add esp, 8
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x160], 2
call fcn.00413ab0
mov byte [esp + 0x15c], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
or edi, 0xffffffff
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41fa3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 2
jg 0x41fa96
add eax, 0xfffffff0
mov byte [esp + 0x15c], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41fa68
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x15c], edi
mov eax, dword [esp + 0x164]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x41fa8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x41fbdc
push 6
push ebx
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edx, dword [esp + 0x18]
mov ecx, 2
push edx
mov esi, eax
mov word [esp + 0x140], cx
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x50
mov dword [esp + 0x144], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x13e], ax
lea eax, [esp + 0x1c]
push eax
push 0x8004667e
mov dword [esp + 0x2c], edi
mov edi, dword [sym.imp.WS2_32.dll_ioctlsocket]
push esi
mov dword [esp + 0x34], 4
mov dword [esp + 0x28], ebx
call edi
push 0x10
lea ecx, [esp + 0x140]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41fb64
lea edx, [esp + 0x2c]
push edx
push 0
lea eax, [esp + 0x3c]
push eax
push 0
lea ecx, [esi + 1]
push ecx
mov dword [esp + 0x40], 5
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], ebx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x41fb64
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x28]
push eax
push 0x1007
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [esp + 0x24], 0
sete bl
jmp 0x41fb68
mov bl, byte [esp + 0x17]
lea ecx, [esp + 0x1c]
push ecx
push 0x8004667e
push esi
mov dword [esp + 0x28], 0
call edi
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [esp + 0x15c], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41fbac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x15c], 0xffffffff
mov eax, dword [esp + 0x164]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41fbda
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, bl
mov ecx, dword [esp + 0x154]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x13c]
xor ecx, esp
call fcn.00499a1c
add esp, 0x150
ret