Function at 0x41d470
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x5c62ce
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
mov eax, dword [0x64aa84]
push esi
mov esi, ecx
mov dword [esp + 0x28], eax
cmp dword [esi + 0x48], 0xffffffff
je 0x41d4a1
xor eax, eax
jmp 0x41d786
mov eax, dword [esp + 0x3c]
push ebx
mov ebx, dword [esp + 0x48]
push edi
lea edi, [esi + 0x14]
cmp eax, edi
je 0x41d4ca
xor ecx, ecx
test ebx, ebx
lea edx, [esi + 0x10]
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
jne 0x41d4ca
mov eax, dword [eax]
mov dword [edi], eax
mov ecx, dword [esp + 0x48]
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_htons]
push ecx
mov word [esi + 0x10], 2
call ebp
mov edx, dword [edi]
push edx
mov word [esi + 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esi + 0x20]
call fcn.00405320
test ebx, ebx
jne 0x41d661
push 6
mov ebx, 1
push ebx
push 2
call dword [sym.imp.WS2_32.dll_socket]
lea ecx, [esp + 0x48]
push ecx
push 0x8004667e
push eax
mov dword [esi + 0x48], eax
mov dword [esp + 0x54], ebx
mov byte [esp + 0x58], bl
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esi + 0x48]
push ebx
lea edx, [esp + 0x50]
push edx
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [0x6613bc]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov word [esp + 0x14], 2
mov ecx, dword [eax + 0x168]
test ecx, ecx
je 0x41d570
movzx eax, word [eax + 0x164]
jmp 0x41d572
xor eax, eax
push eax
call ebp
mov edx, dword [edi]
mov word [esp + 0x16], ax
push edx
lea eax, [esp + 0x54]
xor ebp, ebp
push eax
mov dword [esp + 0x20], ebp
call fcn.0041bde0
mov ecx, eax
call fcn.004828d0
mov dword [esp + 0x40], ebp
lea ecx, [esi + 0x24]
push eax
call fcn.00405540
or ebp, 0xffffffff
mov dword [esp + 0x40], ebp
lea ecx, [esp + 0x50]
call fcn.00401b70
mov edx, dword [esi + 0x48]
mov edi, dword [sym.imp.WS2_32.dll_bind]
push 0x10
lea ecx, [esp + 0x18]
push ecx
push edx
call edi
cmp eax, ebp
je 0x41d64f
mov eax, dword [0x6613bc]
mov ecx, dword [eax + 0x15c]
mov edx, dword [ecx - 0xc]
test edx, edx
je 0x41d609
push ebx
lea edx, [esp + 0x28]
push edx
mov eax, ecx
mov ecx, dword [0x661414]
push 0
push eax
call fcn.00492e80
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41d609
mov ecx, dword [esi + 0x48]
push 0x10
lea eax, [esp + 0x28]
push eax
push ecx
call edi
mov edx, dword [esi + 0x48]
push 0
push 0
push 0
push 0
push 0x10
lea eax, [esi + 0x10]
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAConnect]
test eax, eax
je 0x41d6e4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x41d6e4
push eax
push 0x5e676c
push 3
push 0x661308
call fcn.0046abf0
add esp, 0x10
mov eax, dword [esi + 0x48]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x48], ebp
jmp 0x41d781
cmp word [esp + 0x4c], 0
jne 0x41d67d
mov ecx, dword [0x661418]
mov edx, dword [ecx + 0x8c0]
push 0x1a0a
push edx
jmp 0x41d6bc
mov ebp, dword [0x661410]
mov ecx, dword [ebp + 0x834]
test ecx, ecx
je 0x41d77a
mov eax, dword [esp + 0x48]
mov eax, dword [eax]
xor edx, edx
add eax, ebx
div ecx
xor ecx, ecx
shl edx, 4
mov edi, edx
mov cx, word [edi + ebp + 0x26]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [0x661410]
push eax
mov eax, dword [edi + edx + 0x28]
push eax
push ebx
call sub.TouDll.dll_unsigned_int___cdecl_TouConnect_unsigned_long_int__unsigned_long_int__unsigned_short_int_
add esp, 0xc
test eax, eax
mov ebx, 1
mov dword [esi + 0x48], eax
mov dword [esi + 4], ebx
je 0x41d77a
cmp eax, 0xffffffff
je 0x41d781
or ebp, 0xffffffff
mov ecx, dword [esi + 0x4c]
test ecx, ecx
je 0x41d6f0
mov edx, dword [ecx]
push ebx
call dword [edx]
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x41d6fc
mov eax, dword [ecx]
push ebx
call dword [eax]
push 0x18
call fcn.005abebb
add esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], ebx
test eax, eax
je 0x41d728
mov ecx, dword [0x6613bc]
add ecx, 0x1c8
push ecx
mov ecx, eax
call fcn.00412b20
jmp 0x41d72a
xor eax, eax
mov dword [esp + 0x40], ebp
push 0x18
mov dword [esi + 0x4c], eax
call fcn.005abebb
add esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], 2
test eax, eax
je 0x41d761
mov edx, dword [0x6613bc]
add edx, 0x1cc
push edx
mov ecx, eax
call fcn.00412b20
jmp 0x41d763
xor eax, eax
mov dword [esp + 0x40], ebp
mov dword [esi + 0x50], eax
mov dword [esi + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x30], eax
mov eax, ebx
jmp 0x41d783
mov dword [esi + 0x48], 0xffffffff
xor eax, eax
pop ebp
pop edi
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x28]
pop esi
call fcn.0057981f
add esp, 0x34
ret 0xc