Function at 0x403d20
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43879b
mov eax, dword fs:[0]
push eax
sub esp, 0xb68
mov eax, dword [0x4423c8]
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 eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov esi, ecx
mov ecx, dword [ebp + 0x18]
push ecx
mov dword [ebp - 0xa68], eax
mov eax, dword [ebp + 0x14]
push eax
xor ebx, ebx
push edi
lea ecx, [ebp - 0xa60]
mov dword [ebp - 0xa64], edi
mov dword [esi + 8], ebx
call fcn.00401500
mov dword [ebp - 4], ebx
cmp dword [esi + 0x2c], ebx
je 0x403dfd
mov eax, dword [esi + 0x28]
mov edx, dword [esi + 0x10]
mov ecx, eax
shr ecx, 2
and eax, 3
cmp edx, ebx
je 0x403d99
mov edi, dword [edx]
jmp 0x403d9b
xor edi, edi
cmp dword [edi + 0x14], ecx
ja 0x403dad
cmp edx, ebx
je 0x403da8
mov edi, dword [edx]
jmp 0x403daa
xor edi, edi
sub ecx, dword [edi + 0x14]
cmp edx, ebx
je 0x403db5
mov edx, dword [edx]
jmp 0x403db7
xor edx, edx
mov edx, dword [edx + 0x10]
mov ecx, dword [edx + ecx*4]
mov ecx, dword [ecx + eax*4]
cmp ecx, ebx
je 0x403dcc
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov eax, dword [esi + 0x2c]
cmp eax, ebx
je 0x403df2
mov edx, dword [esi + 0x24]
inc dword [esi + 0x28]
mov ecx, dword [esi + 0x28]
add edx, edx
add edx, edx
cmp edx, ecx
ja 0x403de7
mov dword [esi + 0x28], ebx
dec eax
mov dword [esi + 0x2c], eax
cmp eax, ebx
jne 0x403df2
mov dword [esi + 0x28], ebx
cmp dword [esi + 0x2c], ebx
jne 0x403d83
mov edi, dword [ebp - 0xa64]
mov ecx, dword [esi + 0x30]
cmp ecx, ebx
je 0x403e0f
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov dword [esi + 0x30], ebx
xor eax, eax
mov word [ebp - 0x20], ax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
cmp edi, ebx
je 0x403e55
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x403e39
xor eax, eax
jmp 0x403e55
lea edi, [eax + eax]
mov eax, edi
call fcn.00410e30
mov ecx, dword [ebp - 0xa64]
mov eax, esp
push 3
push edi
push ecx
push eax
call fcn.004015f0
mov edx, dword [ebp + 0x10]
push edx
lea ecx, [ebp - 0x20]
push ecx
push eax
mov ecx, esi
call fcn.004035f0
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
or edi, 0xffffffff
mov dword [esi + 4], eax
lea ecx, [ebp - 0xa60]
cmp eax, edi
jne 0x403e8f
mov dword [ebp - 4], edi
call fcn.004015b0
xor eax, eax
jmp 0x403f6b
lea edx, [esi + 0xc]
push edx
lea eax, [esi + 0x10]
push eax
call fcn.004031b0
mov ecx, dword [ebp - 0xa68]
mov edx, dword [esi + 4]
push 0x12
push 0x4d2
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, edi
jne 0x403eda
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0xa60]
mov dword [esi + 4], edi
mov dword [ebp - 4], edi
call fcn.004015b0
xor eax, eax
jmp 0x403f6b
mov edx, dword [esi + 4]
push 0x10
lea ecx, [ebp - 0x20]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, edi
jne 0x403efb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x403eb8
mov ecx, dword [esi + 4]
lea edx, [ebp - 0xa70]
push edx
push ebx
lea eax, [ebp - 0xb74]
push eax
push ebx
push ebx
mov dword [ebp - 0xb70], ecx
mov dword [ebp - 0xb74], 1
mov dword [ebp - 0xa70], 5
mov dword [ebp - 0xa6c], ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jg 0x403f58
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0xa60]
mov dword [esi + 4], edi
mov dword [ebp - 4], edi
call fcn.004015b0
xor eax, eax
jmp 0x403f6b
lea ecx, [ebp - 0xa60]
mov dword [ebp - 4], edi
call fcn.004015b0
mov eax, 1
lea esp, [ebp - 0xb84]
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.004109f8
mov esp, ebp
pop ebp
ret 0x14