Function at 0x410fb0
Capabilities:
Create tcp socket
Create udp socket
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x58f0e2
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x5f4760]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f4760]
xor eax, esp
push eax
lea eax, [esp + 0x94]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xa4]
xor eax, eax
mov dword [ebp + 0x1c], eax
lea ebx, [ebp + 0x1c]
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov eax, 2
mov word [ebx], ax
movzx edx, word [0x604330]
mov eax, dword [0x60432c]
mov edi, ecx
mov ecx, dword [0x604340]
push ecx
push edx
push eax
push str.OnRequestConnect_proxy__s:_u__type__d
mov esi, 0x602250
call fcn.00409e30
mov eax, dword [0x604340]
add esp, 0x10
cmp eax, 1
je 0x411044
cmp eax, 2
jne 0x41113d
mov ecx, dword [0x60432c]
cmp dword [ecx - 0xc], 0
je 0x41113d
cmp dword [edi + 0x8024], 0
jne 0x4110c6
push ecx
mov edx, esp
mov dword [esp + 0x1c], esp
push 0x60432c
push edx
call fcn.00406380
mov dword [esp + 0xa0], 0
or esi, 0xffffffff
mov dword [esp + 0xa0], esi
call fcn.00417da0
add esp, 4
test eax, eax
je 0x41109f
movzx eax, word [0x604330]
cmp eax, dword [0x603db0]
je 0x4110c9
mov ecx, dword [0x60432c]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebx + 4], eax
movzx edx, word [0x604330]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 2], ax
jmp 0x4111d4
or esi, 0xffffffff
lea eax, [ebp + 0x2c]
push eax
lea ecx, [esp + 0x74]
call fcn.00403ca0
mov dword [esp + 0x9c], 1
lea ecx, [esp + 0x70]
call fcn.0040d160
mov dword [ebx + 4], eax
movzx ecx, word [ebp + 0x12c]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 2], ax
mov dword [esp + 0x9c], esi
cmp dword [esp + 0x88], 0x10
jb 0x41111d
mov edx, dword [esp + 0x74]
push edx
call fcn.004a3142
add esp, 4
mov dword [esp + 0x88], 0xf
mov dword [esp + 0x84], 0
mov byte [esp + 0x74], 0
jmp 0x4111d4
lea esi, [ebp + 0x2c]
mov eax, esi
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], 0
mov byte [esp + 0x48], 0
lea ecx, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x411160
sub eax, ecx
push eax
push esi
lea ecx, [esp + 0x4c]
call fcn.004027e0
mov dword [esp + 0x9c], 2
lea ecx, [esp + 0x44]
call fcn.0040d160
mov dword [ebx + 4], eax
movzx eax, word [ebp + 0x12c]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 2], ax
mov dword [esp + 0x9c], 0xffffffff
cmp dword [esp + 0x5c], 0x10
jb 0x4111bc
mov ecx, dword [esp + 0x48]
push ecx
call fcn.004a3142
add esp, 4
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], 0
mov byte [esp + 0x48], 0
or esi, 0xffffffff
mov edx, dword [ebx + 4]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
call fcn.00402fe0
mov dword [esp + 0x9c], 3
cmp dword [ebx + 4], 0
je 0x4112a7
push ecx
mov edx, esp
mov dword [esp + 0x1c], esp
lea eax, [esp + 0x18]
push eax
push edx
call fcn.00406380
mov byte [esp + 0xa0], 4
mov byte [esp + 0xa0], 3
call fcn.00417da0
add esp, 4
test eax, eax
je 0x4112a7
movzx ecx, word [ebp + 0x12c]
cmp ecx, dword [0x603db0]
jne 0x4112a7
lea edx, [esp + 0x1c]
push edx
call fcn.004030f0
mov byte [esp + 0x9c], 5
movzx eax, word [ebp + 0x12c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push str.Local_ip__s_and_port__d
lea edi, [esp + 0x28]
call fcn.00402e20
mov edx, dword [esp + 0x28]
add esp, 0xc
push edx
mov ebx, esi
mov edi, ebp
call fcn.0040fc30
add esp, 4
mov byte [esp + 0x9c], 3
lea eax, [esp + 0x1c]
push eax
call fcn.00403090
mov dword [esp + 0x9c], esi
lea ecx, [esp + 0x14]
push ecx
call fcn.00403090
xor al, al
jmp 0x411633
push 1
push 0
push 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov dword [ebp + 0x18], eax
cmp eax, esi
jne 0x4112ef
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Proxy_WSASocket__
mov ebx, eax
mov edi, ebp
call fcn.0040fc30
add esp, 4
mov dword [esp + 0x9c], esi
lea edx, [esp + 0x14]
push edx
call fcn.00403090
xor al, al
jmp 0x411633
cmp dword [0x603db4], 9
jne 0x411314
mov eax, dword [0x601e54]
mov ecx, dword [ebp + 0x18]
push eax
push ecx
push str.__u__OnRequestConnect_create_socket_tcp_count_d
mov esi, 0x602250
call fcn.00409e30
add esp, 0xc
mov ecx, dword [ebp + 0x18]
mov edx, dword [0x603db8]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0x24]
push eax
push 0x1002
push 0xffff
push ecx
mov dword [esp + 0x34], edx
call esi
mov eax, dword [ebp + 0x18]
push 4
lea edx, [esp + 0x24]
push edx
push 0x1001
push 0xffff
push eax
call esi
mov edx, dword [ebp + 0x18]
push 4
lea ecx, [esp + 0x34]
push ecx
push 0xffffff7f
push 0xffff
push edx
mov dword [esp + 0x44], 0
call esi
cmp eax, 0xffffffff
jne 0x4113c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OnRequestConnect_setsockopt_SO_DONTLINGER_error___d
mov esi, 0x602250
call fcn.00409e30
add esp, 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.setsockopt_SO_DONTLINGER_error__d
mov ebx, eax
mov edi, ebp
call fcn.0040fc30
add esp, 4
mov dword [esp + 0x9c], 0xffffffff
lea eax, [esp + 0x14]
push eax
call fcn.00403090
xor al, al
jmp 0x411633
mov edx, dword [ebp + 0x18]
push 4
lea ecx, [esp + 0x2c]
push ecx
push 4
push 0xffff
push edx
mov dword [esp + 0x3c], 1
call esi
cmp eax, 0xffffffff
jne 0x4113fc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.OnRequestConnect_setsockopt_SO_REUSEADDR_error___d
mov esi, 0x602250
call fcn.00409e30
add esp, 8
mov eax, dword [ebp]
mov ecx, dword [ebp + 0x18]
xor esi, esi
push esi
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
jne 0x411445
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Proxy_CreateIoCompletionPort
mov ebx, eax
mov edi, ebp
call fcn.0040fc30
add esp, 4
mov dword [esp + 0x9c], 0xffffffff
lea edx, [esp + 0x14]
push edx
call fcn.00403090
xor al, al
jmp 0x411633
mov eax, 2
push esi
mov word [esp + 0x64], ax
call dword [sym.imp.WS2_32.dll_htonl]
push esi
mov dword [esp + 0x68], eax
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp + 0x18]
push 0x10
lea ecx, [esp + 0x64]
push ecx
push edx
mov word [esp + 0x6e], ax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4114af
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Proxy_bind
mov ebx, eax
mov edi, ebp
call fcn.0040fc30
add esp, 4
mov dword [esp + 0x9c], 0xffffffff
lea eax, [esp + 0x14]
push eax
call fcn.00403090
xor al, al
jmp 0x411633
push esi
push esi
lea eax, [esp + 0x34]
push eax
mov eax, dword [ebp + 0x18]
push 4
mov ecx, 0xddf3
mov word [esp + 0x48], cx
lea ecx, [esp + 0x34]
push ecx
mov edx, 0x4660
push 0x10
mov word [esp + 0x52], dx
lea edx, [esp + 0x4c]
push edx
push 0xc8000006
push eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x58], 0x25a207b9
mov byte [esp + 0x60], 0x8e
mov byte [esp + 0x61], 0xe9
mov byte [esp + 0x62], 0x76
mov byte [esp + 0x63], 0xe5
mov byte [esp + 0x64], 0x8c
mov byte [esp + 0x65], 0x74
mov byte [esp + 0x66], 6
mov byte [esp + 0x67], 0x3e
mov dword [esp + 0x50], esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
jne 0x41152a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, dword [ebx + 4]
cmp eax, esi
je 0x4115d8
cmp eax, 0xffffffff
je 0x4115d8
mov edx, dword [esp + 0x24]
cmp edx, esi
je 0x4115d8
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [esp + 0x18], esi
mov dword [edi + 0x10], eax
mov eax, dword [edi + 0x801c]
lea esi, [ebp + 0x134]
push esi
lea esi, [esp + 0x1c]
push esi
push eax
lea ecx, [edi + 0x1c]
push ecx
push 0x10
mov dword [edi + 0x8028], 2
mov dword [edi + 0x8020], 1
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], ecx
mov ecx, dword [ebp + 0x18]
push ebx
push ecx
call edx
cmp eax, 0xffffffff
jne 0x41161c
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x41161c
call esi
push str.Proxy_ConnectEx
mov ebx, eax
mov edi, ebp
call fcn.0040fc30
add esp, 4
mov dword [esp + 0x9c], 0xffffffff
lea edx, [esp + 0x14]
push edx
call fcn.00403090
xor al, al
jmp 0x411633
push 8
mov dword [edi + 0x8028], 5
call fcn.004a3245
add esp, 4
mov dword [esp + 0x18], eax
mov byte [esp + 0x9c], 6
cmp eax, esi
je 0x411603
call fcn.0040d370
jmp 0x411605
xor eax, eax
mov byte [esp + 0x9c], 3
mov dword [ebp + 0x130], eax
mov esi, eax
mov dword [eax], ebp
call fcn.0040d400
mov dword [esp + 0x9c], 0xffffffff
lea eax, [esp + 0x14]
push eax
call fcn.00403090
mov al, 1
mov ecx, dword [esp + 0x94]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.004a314d
add esp, 0x8c
ret