Function at 0x10077bc0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c6dee
mov eax, dword fs:[0]
push eax
sub esp, 0x9fc
mov eax, dword [0x100f7084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x958], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x24]
mov dword [eax], 0
mov dword [ebp - 0x96c], 3
mov dword [ebp - 0x968], 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x990], eax
cmp dword [ebp - 0x990], 0xffffffff
je 0x10077c42
mov ecx, dword [ebp - 0x990]
push ecx
mov ecx, dword [ebp - 0x958]
call fcn.1007a7f0
mov edx, dword [ebp - 0x958]
cmp dword [edx + 0xa0], 0xffffffff
jne 0x10077cae
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xa08], eax
movzx eax, word [ebp - 0xa08]
and eax, 0xffff
or eax, 0x10000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10077ca5
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10077ca5
push str.socks5_subagent_create_socket_failed
push 3
push 0x22a
push 0x100d8404
call dword [0x100fa800]
add esp, 0x10
mov byte [ebp + 0x28], 0
jmp 0x10078ee0
mov dword [ebp - 0xa04], 1
lea eax, [ebp - 0xa04]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x10077d35
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9f4], eax
movzx eax, word [ebp - 0x9f4]
and eax, 0xffff
or eax, 0x20000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10077d30
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10077d30
push str.socks5_subagent_ioctlsocket_failed
push 3
push 0x236
push 0x100d84b0
call dword [0x100fa800]
add esp, 0x10
jmp 0x10078ee0
mov eax, 2
mov word [ebp - 0x820], ax
movzx ecx, word [ebp + 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x81e], ax
lea ecx, [ebp + 8]
call fcn.10007050
push eax
lea ecx, [ebp - 0x93c]
call fcn.10005de0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x93c]
push edx
call fcn.1002bbb0
add esp, 4
mov dword [ebp - 0x81c], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x93c]
call fcn.10005f30
cmp dword [ebp - 0x81c], 0xffffffff
jne 0x10077e5c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x994], eax
movzx eax, word [ebp - 0x994]
and eax, 0xffff
or eax, 0x30000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10077e3b
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10077e3b
mov eax, dword [ebp - 0x994]
push eax
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x954]
push edx
call fcn.1002f210
add esp, 8
mov dword [ebp - 0x9f8], eax
mov eax, dword [ebp - 0x9f8]
mov dword [ebp - 0x9fc], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x9fc]
call fcn.10049c40
push eax
push str.socks5_subagent_inet_addr_failed:_s__d
push 3
push 0x243
push 0x100d8520
call dword [0x100fa800]
add esp, 0x18
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x954]
call fcn.1000c290
mov byte [ebp - 0x95f], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov al, byte [ebp - 0x95f]
jmp 0x10078f07
push 0x10
lea ecx, [ebp - 0x820]
push ecx
mov edx, dword [ebp - 0x958]
mov eax, dword [edx + 0xa0]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10077f07
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x980], eax
cmp dword [ebp - 0x980], 0x2714
je 0x10077f07
cmp dword [ebp - 0x980], 0x2733
je 0x10077f07
cmp dword [ebp - 0x980], 0x2734
je 0x10077f07
movzx ecx, word [ebp - 0x980]
and ecx, 0xffff
or ecx, 0x40000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x10077f02
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10077f02
mov ecx, dword [ebp - 0x980]
push ecx
push str.socks5_subagent_0.1_failed:__d
push 3
push 0x24d
push 0x100d8540
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x970], 0
jmp 0x10077f2c
mov edx, dword [ebp - 0x970]
add edx, 1
mov dword [ebp - 0x970], edx
mov eax, dword [ebp - 0x970]
cmp eax, dword [ebp - 0x924]
jae 0x10077f59
mov ecx, dword [ebp - 0x970]
mov edx, dword [ebp - 0x958]
mov eax, dword [ebp + ecx*4 - 0x920]
cmp eax, dword [edx + 0xa0]
jne 0x10077f57
jmp 0x10077f59
jmp 0x10077f1d
mov ecx, dword [ebp - 0x970]
cmp ecx, dword [ebp - 0x924]
jne 0x10077f98
cmp dword [ebp - 0x924], 0x40
jae 0x10077f98
mov edx, dword [ebp - 0x970]
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0xa0]
mov dword [ebp + edx*4 - 0x920], ecx
mov edx, dword [ebp - 0x924]
add edx, 1
mov dword [ebp - 0x924], edx
xor eax, eax
jne 0x10077f11
mov dword [ebp - 0x96c], 3
mov dword [ebp - 0x968], 0
lea ecx, [ebp - 0x96c]
push ecx
push 0
lea edx, [ebp - 0x924]
push edx
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x95c], eax
cmp dword [ebp - 0x95c], 0
jge 0x1007803d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x998], eax
movzx eax, word [ebp - 0x998]
and eax, 0xffff
or eax, 0x50000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10078038
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078038
mov eax, dword [ebp - 0x998]
push eax
push str.socks5_subagent_0.2_failed:__d
push 3
push 0x25e
push 0x100d8560
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
cmp dword [ebp - 0x95c], 0
jne 0x100780a8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x99c], eax
movzx ecx, word [ebp - 0x99c]
and ecx, 0xffff
or ecx, 0x60000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x100780a3
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100780a3
mov ecx, dword [ebp - 0x99c]
push ecx
push str.socks5_subagent_0.3_failed:__d
push 3
push 0x266
push 0x100d85c0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
lea edx, [ebp - 0x924]
push edx
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0xa0]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x10078127
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9a0], eax
movzx edx, word [ebp - 0x9a0]
and edx, 0xffff
or edx, 0x70000
mov eax, dword [ebp + 0x24]
mov dword [eax], edx
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x10078122
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078122
mov edx, dword [ebp - 0x9a0]
push edx
push str.socks5_subagent_0.4_failed:__d
push 3
push 0x26e
push 0x100d8620
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x974], 0
jmp 0x1007814c
mov eax, dword [ebp - 0x974]
add eax, 1
mov dword [ebp - 0x974], eax
mov ecx, dword [ebp - 0x974]
cmp ecx, dword [ebp - 0x924]
jae 0x10078179
mov edx, dword [ebp - 0x974]
mov eax, dword [ebp - 0x958]
mov ecx, dword [ebp + edx*4 - 0x920]
cmp ecx, dword [eax + 0xa0]
jne 0x10078177
jmp 0x10078179
jmp 0x1007813d
mov edx, dword [ebp - 0x974]
cmp edx, dword [ebp - 0x924]
jne 0x100781b8
cmp dword [ebp - 0x924], 0x40
jae 0x100781b8
mov eax, dword [ebp - 0x974]
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
mov dword [ebp + eax*4 - 0x920], edx
mov eax, dword [ebp - 0x924]
add eax, 1
mov dword [ebp - 0x924], eax
xor ecx, ecx
jne 0x10078131
mov dword [ebp - 0x96c], 3
mov dword [ebp - 0x968], 0
mov byte [ebp - 0x410], 0
push 0x3ff
push 0
lea edx, [ebp - 0x40f]
push edx
call fcn.1009ee30
add esp, 0xc
mov byte [ebp - 0x810], 0
push 0x3ff
push 0
lea eax, [ebp - 0x80f]
push eax
call fcn.1009ee30
add esp, 0xc
mov ecx, 1
imul edx, ecx, 0
mov byte [ebp + edx - 0x410], 0xf
mov eax, 1
shl eax, 0
mov byte [ebp + eax - 0x410], 1
mov ecx, 1
shl ecx, 1
mov byte [ebp + ecx - 0x410], 2
push 3
lea edx, [ebp - 0x410]
push edx
call fcn.10043c50
add esp, 8
push 0
push 3
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x100782d1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9a4], eax
movzx eax, word [ebp - 0x9a4]
and eax, 0xffff
or eax, 0x80000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x100782cc
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100782cc
mov eax, dword [ebp - 0x9a4]
push eax
push str.socks5_subagent_1.1_failed:__d
push 3
push 0x284
push 0x100d8680
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
lea ecx, [ebp - 0x96c]
push ecx
push 0
push 0
lea edx, [ebp - 0x924]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x95c], eax
cmp dword [ebp - 0x95c], 0
jge 0x1007835a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9f0], eax
movzx eax, word [ebp - 0x9f0]
and eax, 0xffff
or eax, 0x90000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10078355
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078355
mov eax, dword [ebp - 0x9f0]
push eax
push str.socks5_subagent_1.2_failed:__d
push 3
push 0x28e
push 0x100d86e0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
cmp dword [ebp - 0x95c], 0
jne 0x100783c5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9ec], eax
movzx ecx, word [ebp - 0x9ec]
and ecx, 0xffff
or ecx, 0xa0000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x100783c0
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100783c0
mov ecx, dword [ebp - 0x9ec]
push ecx
push str.socks5_subagent_1.3_failed:__d
push 3
push 0x296
push 0x100d8740
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
lea edx, [ebp - 0x924]
push edx
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0xa0]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x10078444
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9e8], eax
movzx edx, word [ebp - 0x9e8]
and edx, 0xffff
or edx, 0xb0000
mov eax, dword [ebp + 0x24]
mov dword [eax], edx
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x1007843f
call dword [0x100fa7f8]
cmp eax, 3
jg 0x1007843f
mov edx, dword [ebp - 0x9e8]
push edx
push str.socks5_subagent_1.4_failed:__d
push 3
push 0x29e
push 0x100d87a0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0
push 0x400
lea eax, [ebp - 0x810]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x100784c9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9e4], eax
movzx eax, word [ebp - 0x9e4]
and eax, 0xffff
or eax, 0xc0000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x100784c4
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100784c4
mov eax, dword [ebp - 0x9e4]
push eax
push str.socks5_subagent_1.5_failed:__d
push 3
push 0x2a7
push 0x100d8800
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0x400
lea ecx, [ebp - 0x810]
push ecx
call fcn.10043c00
add esp, 8
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [ebp + eax - 0x810]
cmp ecx, 5
jne 0x10078509
mov edx, 1
shl edx, 0
movsx eax, byte [ebp + edx - 0x810]
cmp eax, 0xff
jne 0x1007856b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9e0], eax
movzx ecx, word [ebp - 0x9e0]
and ecx, 0xffff
or ecx, 0xd0000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x10078566
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078566
mov ecx, dword [ebp - 0x9e0]
push ecx
push str.socks5_subagent_1.6_failed:__d
push 3
push 0x2b3
push 0x100d8860
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0x400
push 0
lea edx, [ebp - 0x410]
push edx
call fcn.1009ee30
add esp, 0xc
mov ecx, dword [ebp - 0x958]
add ecx, 0x1c
call fcn.10007200
mov dword [ebp - 0x984], eax
mov ecx, dword [ebp - 0x958]
add ecx, 0x34
call fcn.10007200
mov dword [ebp - 0x98c], eax
mov eax, 1
imul ecx, eax, 0
mov byte [ebp + ecx - 0x410], 1
mov edx, 1
shl edx, 0
mov al, byte [ebp - 0x984]
mov byte [ebp + edx - 0x410], al
mov ecx, dword [ebp - 0x984]
push ecx
mov ecx, dword [ebp - 0x958]
add ecx, 0x1c
call fcn.10007050
push eax
lea edx, [ebp - 0x40e]
push edx
call fcn.1009e8b0
add esp, 0xc
mov eax, dword [ebp - 0x984]
mov cl, byte [ebp - 0x98c]
mov byte [ebp + eax - 0x40e], cl
mov edx, dword [ebp - 0x98c]
push edx
mov ecx, dword [ebp - 0x958]
add ecx, 0x34
call fcn.10007050
push eax
mov eax, dword [ebp - 0x984]
lea ecx, [ebp + eax - 0x40d]
push ecx
call fcn.1009e8b0
add esp, 0xc
mov edx, dword [ebp - 0x98c]
mov eax, dword [ebp - 0x984]
lea ecx, [eax + edx + 3]
mov dword [ebp - 0x9d8], ecx
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x978], 0
jmp 0x1007866d
mov edx, dword [ebp - 0x978]
add edx, 1
mov dword [ebp - 0x978], edx
mov eax, dword [ebp - 0x978]
cmp eax, dword [ebp - 0x924]
jae 0x1007869a
mov ecx, dword [ebp - 0x978]
mov edx, dword [ebp - 0x958]
mov eax, dword [ebp + ecx*4 - 0x920]
cmp eax, dword [edx + 0xa0]
jne 0x10078698
jmp 0x1007869a
jmp 0x1007865e
mov ecx, dword [ebp - 0x978]
cmp ecx, dword [ebp - 0x924]
jne 0x100786d9
cmp dword [ebp - 0x924], 0x40
jae 0x100786d9
mov edx, dword [ebp - 0x978]
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0xa0]
mov dword [ebp + edx*4 - 0x920], ecx
mov edx, dword [ebp - 0x924]
add edx, 1
mov dword [ebp - 0x924], edx
xor eax, eax
jne 0x10078652
mov dword [ebp - 0x96c], 3
mov dword [ebp - 0x968], 0
mov ecx, dword [ebp - 0x9d8]
push ecx
lea edx, [ebp - 0x410]
push edx
call fcn.10043c50
add esp, 8
push 0
mov eax, dword [ebp - 0x9d8]
push eax
lea ecx, [ebp - 0x410]
push ecx
mov edx, dword [ebp - 0x958]
mov eax, dword [edx + 0xa0]
push eax
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x10078795
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9dc], eax
movzx ecx, word [ebp - 0x9dc]
and ecx, 0xffff
or ecx, 0xe0000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x10078790
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078790
mov ecx, dword [ebp - 0x9dc]
push ecx
push str.socks5_subagent_2.1_failed:__d
push 3
push 0x2d0
push 0x100d88c0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
lea edx, [ebp - 0x96c]
push edx
push 0
push 0
lea eax, [ebp - 0x924]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x95c], eax
cmp dword [ebp - 0x95c], 0
jge 0x10078820
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9a8], eax
movzx ecx, word [ebp - 0x9a8]
and ecx, 0xffff
or ecx, 0xf0000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x1007881b
call dword [0x100fa7f8]
cmp eax, 3
jg 0x1007881b
mov ecx, dword [ebp - 0x9a8]
push ecx
push str.socks5_subagent_2.2_failed:__d
push 3
push 0x2da
push 0x100d8920
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
cmp dword [ebp - 0x95c], 0
jne 0x1007888b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9ac], eax
movzx edx, word [ebp - 0x9ac]
and edx, 0xffff
or edx, 0x100000
mov eax, dword [ebp + 0x24]
mov dword [eax], edx
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x10078886
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078886
mov edx, dword [ebp - 0x9ac]
push edx
push str.socks5_subagent_2.3_failed:__d
push 3
push 0x2e2
push 0x100d8980
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
lea eax, [ebp - 0x924]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x10078908
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9b0], eax
movzx eax, word [ebp - 0x9b0]
and eax, 0xffff
or eax, 0x110000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10078903
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078903
mov eax, dword [ebp - 0x9b0]
push eax
push str.socks5_subagent_2.4_failed:__d
push 3
push 0x2ea
push 0x100d89e0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0
push 0x400
lea ecx, [ebp - 0x810]
push ecx
mov edx, dword [ebp - 0x958]
mov eax, dword [edx + 0xa0]
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x1007898f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9b4], eax
movzx ecx, word [ebp - 0x9b4]
and ecx, 0xffff
or ecx, 0x120000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x1007898a
call dword [0x100fa7f8]
cmp eax, 3
jg 0x1007898a
mov ecx, dword [ebp - 0x9b4]
push ecx
push str.socks5_subagent_2.5_failed:__d
push 3
push 0x2f3
push 0x100d8a40
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0x400
lea edx, [ebp - 0x810]
push edx
call fcn.10043c00
add esp, 8
mov eax, 1
shl eax, 0
movsx ecx, byte [ebp + eax - 0x810]
test ecx, ecx
je 0x10078a19
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9b8], eax
movzx edx, word [ebp - 0x9b8]
and edx, 0xffff
or edx, 0x130000
mov eax, dword [ebp + 0x24]
mov dword [eax], edx
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x10078a14
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078a14
mov edx, dword [ebp - 0x9b8]
push edx
push str.socks5_subagent_2.6_failed:__d
push 3
push 0x2ff
push 0x100d8aa0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0x400
push 0
lea eax, [ebp - 0x410]
push eax
call fcn.1009ee30
add esp, 0xc
mov ecx, 1
imul edx, ecx, 0
mov byte [ebp + edx - 0x410], 5
mov eax, 1
shl eax, 0
mov byte [ebp + eax - 0x410], 1
mov ecx, 1
shl ecx, 1
mov dword [ebp - 0x9bc], ecx
cmp dword [ebp - 0x9bc], 0x400
jae 0x10078a6a
jmp 0x10078a6f
call fcn.10086d4a
mov edx, dword [ebp - 0x9bc]
mov byte [ebp + edx - 0x410], 0
mov eax, 1
imul ecx, eax, 3
mov byte [ebp + ecx - 0x410], 1
mov dword [ebp - 0xa00], 0
movzx edx, byte [ebp + 0x28]
test edx, edx
je 0x10078ab3
push 0x15b4
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x97a], ax
jmp 0x10078ac5
push 0x15b3
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x97a], ax
mov ax, word [ebp - 0x97a]
mov word [ebp - 0x988], ax
mov ecx, dword [ebp - 0xa00]
mov dword [ebp - 0x40c], ecx
mov dx, word [ebp - 0x988]
mov word [ebp - 0x408], dx
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x964], 0
jmp 0x10078b12
mov eax, dword [ebp - 0x964]
add eax, 1
mov dword [ebp - 0x964], eax
mov ecx, dword [ebp - 0x964]
cmp ecx, dword [ebp - 0x924]
jae 0x10078b3f
mov edx, dword [ebp - 0x964]
mov eax, dword [ebp - 0x958]
mov ecx, dword [ebp + edx*4 - 0x920]
cmp ecx, dword [eax + 0xa0]
jne 0x10078b3d
jmp 0x10078b3f
jmp 0x10078b03
mov edx, dword [ebp - 0x964]
cmp edx, dword [ebp - 0x924]
jne 0x10078b7e
cmp dword [ebp - 0x924], 0x40
jae 0x10078b7e
mov eax, dword [ebp - 0x964]
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
mov dword [ebp + eax*4 - 0x920], edx
mov eax, dword [ebp - 0x924]
add eax, 1
mov dword [ebp - 0x924], eax
xor ecx, ecx
jne 0x10078af7
mov dword [ebp - 0x96c], 3
mov dword [ebp - 0x968], 0
push 0xa
lea edx, [ebp - 0x410]
push edx
call fcn.10043c50
add esp, 8
push 0
push 0xa
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x10078c2e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9c0], eax
movzx eax, word [ebp - 0x9c0]
and eax, 0xffff
or eax, 0x140000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10078c29
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078c29
mov eax, dword [ebp - 0x9c0]
push eax
push str.socks5_subagent_3.1_failed:__d
push 3
push 0x31b
push 0x100d8b00
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
lea ecx, [ebp - 0x96c]
push ecx
push 0
push 0
lea edx, [ebp - 0x924]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x95c], eax
cmp dword [ebp - 0x95c], 0
jge 0x10078cb7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9c4], eax
movzx eax, word [ebp - 0x9c4]
and eax, 0xffff
or eax, 0x150000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10078cb2
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078cb2
mov eax, dword [ebp - 0x9c4]
push eax
push str.socks5_subagent_3.2_failed:__d
push 3
push 0x325
push 0x100d8b60
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
cmp dword [ebp - 0x95c], 0
jne 0x10078d22
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9c8], eax
movzx ecx, word [ebp - 0x9c8]
and ecx, 0xffff
or ecx, 0x160000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x10078d1d
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078d1d
mov ecx, dword [ebp - 0x9c8]
push ecx
push str.socks5_subagent_3.3_failed:__d
push 3
push 0x32d
push 0x100d8bc0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
lea edx, [ebp - 0x924]
push edx
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0xa0]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x10078da1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9cc], eax
movzx edx, word [ebp - 0x9cc]
and edx, 0xffff
or edx, 0x170000
mov eax, dword [ebp + 0x24]
mov dword [eax], edx
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x10078d9c
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078d9c
mov edx, dword [ebp - 0x9cc]
push edx
push str.socks5_subagent_3.4_failed:__d
push 3
push 0x335
push 0x100d8c20
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0
push 0x400
lea eax, [ebp - 0x810]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0xa0]
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x10078e26
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9d0], eax
movzx eax, word [ebp - 0x9d0]
and eax, 0xffff
or eax, 0x180000
mov ecx, dword [ebp + 0x24]
mov dword [ecx], eax
call dword [0x100fa7f0]
movzx edx, al
test edx, edx
je 0x10078e21
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078e21
mov eax, dword [ebp - 0x9d0]
push eax
push str.socks5_subagent_3.5_failed:__d
push 3
push 0x33e
push 0x100d8c80
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
push 0x400
lea ecx, [ebp - 0x810]
push ecx
call fcn.10043c00
add esp, 8
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [ebp + eax - 0x810]
cmp ecx, 5
jne 0x10078e63
mov edx, 1
shl edx, 0
movsx eax, byte [ebp + edx - 0x810]
test eax, eax
je 0x10078ec2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9d4], eax
movzx ecx, word [ebp - 0x9d4]
and ecx, 0xffff
or ecx, 0x190000
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x10078ec0
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10078ec0
mov ecx, dword [ebp - 0x9d4]
push ecx
push str.socks5_subagent_3.6_failed:__d
push 3
push 0x34a
push str.subagentSubAgentMonitor.cpp
call dword [0x100fa800]
add esp, 0x14
jmp 0x10078ee0
mov byte [ebp - 0x95d], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov al, byte [ebp - 0x95d]
jmp 0x10078f07
mov ecx, dword [ebp - 0x958]
call fcn.1007a380
mov byte [ebp - 0x95e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov al, byte [ebp - 0x95e]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10086b0f
mov esp, ebp
pop ebp
ret 0x24