Function at 0x10041430
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 0x100c312e
mov eax, dword fs:[0]
push eax
sub esp, 0xa04
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 - 0x970], 3
mov dword [ebp - 0x96c], 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x98c], eax
cmp dword [ebp - 0x98c], 0xffffffff
je 0x100414b2
mov ecx, dword [ebp - 0x98c]
push ecx
mov ecx, dword [ebp - 0x958]
call fcn.100440d0
mov edx, dword [ebp - 0x958]
cmp dword [edx + 0x44], 0xffffffff
jne 0x1004151b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xa00], eax
movzx eax, word [ebp - 0xa00]
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 0x10041512
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041512
push str.socks5_master_create_socket_failed
push 3
push 0xdd
push 0x100cec40
call dword [0x100fa800]
add esp, 0x10
mov byte [ebp + 0x28], 0
jmp 0x10042729
mov dword [ebp - 0x9f8], 1
lea eax, [ebp - 0x9f8]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1004159f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9fc], eax
movzx eax, word [ebp - 0x9fc]
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 0x1004159a
call dword [0x100fa7f8]
cmp eax, 3
jg 0x1004159a
push str.socks5_master_ioctlsocket_failed
push 3
push 0xe9
push 0x100cec54
call dword [0x100fa800]
add esp, 0x10
jmp 0x10042729
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
mov ecx, dword [ebp - 0x958]
add ecx, 0x60
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 0x100416d5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x990], eax
movzx eax, word [ebp - 0x990]
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 0x100416b1
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100416b1
mov eax, dword [ebp - 0x990]
push eax
mov ecx, dword [ebp - 0x958]
add ecx, 0x60
push ecx
lea edx, [ebp - 0x954]
push edx
call fcn.1002f210
add esp, 8
mov dword [ebp - 0xa10], eax
mov eax, dword [ebp - 0xa10]
mov dword [ebp - 0xa04], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xa04]
call fcn.10049c40
push eax
push str.socks5_master_inet_addr_failed:_s__d
push 3
push 0xf6
push 0x100ced3c
call dword [0x100fa800]
add esp, 0x18
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x954]
call fcn.1000c290
mov dword [ebp - 0xa08], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov eax, dword [ebp - 0xa08]
jmp 0x10042753
push 0x10
lea ecx, [ebp - 0x820]
push ecx
mov edx, dword [ebp - 0x958]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1004177d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x97c], eax
cmp dword [ebp - 0x97c], 0x2714
je 0x1004177d
cmp dword [ebp - 0x97c], 0x2733
je 0x1004177d
cmp dword [ebp - 0x97c], 0x2734
je 0x1004177d
movzx ecx, word [ebp - 0x97c]
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 0x10041778
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041778
mov ecx, dword [ebp - 0x97c]
push ecx
push str.socks5_master_0.1_failed:__d
push 3
push 0x100
push 0x100cee04
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x964], 0
jmp 0x100417a2
mov edx, dword [ebp - 0x964]
add edx, 1
mov dword [ebp - 0x964], edx
mov eax, dword [ebp - 0x964]
cmp eax, dword [ebp - 0x924]
jae 0x100417cc
mov ecx, dword [ebp - 0x964]
mov edx, dword [ebp - 0x958]
mov eax, dword [ebp + ecx*4 - 0x920]
cmp eax, dword [edx + 0x44]
jne 0x100417ca
jmp 0x100417cc
jmp 0x10041793
mov ecx, dword [ebp - 0x964]
cmp ecx, dword [ebp - 0x924]
jne 0x10041808
cmp dword [ebp - 0x924], 0x40
jae 0x10041808
mov edx, dword [ebp - 0x964]
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0x44]
mov dword [ebp + edx*4 - 0x920], ecx
mov edx, dword [ebp - 0x924]
add edx, 1
mov dword [ebp - 0x924], edx
xor eax, eax
jne 0x10041787
mov dword [ebp - 0x970], 3
mov dword [ebp - 0x96c], 0
lea ecx, [ebp - 0x970]
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 0x100418ad
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x994], eax
movzx eax, word [ebp - 0x994]
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 0x100418a8
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100418a8
mov eax, dword [ebp - 0x994]
push eax
push str.socks5_master_0.2_failed:__d
push 3
push 0x111
push 0x100ceeac
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
cmp dword [ebp - 0x95c], 0
jne 0x10041918
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x998], eax
movzx ecx, word [ebp - 0x998]
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 0x10041913
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041913
mov ecx, dword [ebp - 0x998]
push ecx
push str.socks5_master_0.3_failed:__d
push 3
push 0x119
push 0x100ceefc
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
lea edx, [ebp - 0x924]
push edx
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0x44]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x10041994
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x99c], eax
movzx edx, word [ebp - 0x99c]
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 0x1004198f
call dword [0x100fa7f8]
cmp eax, 3
jg 0x1004198f
mov edx, dword [ebp - 0x99c]
push edx
push str.socks5_master_0.4_failed:__d
push 3
push 0x121
push 0x100cef4c
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x968], 0
jmp 0x100419b9
mov eax, dword [ebp - 0x968]
add eax, 1
mov dword [ebp - 0x968], eax
mov ecx, dword [ebp - 0x968]
cmp ecx, dword [ebp - 0x924]
jae 0x100419e3
mov edx, dword [ebp - 0x968]
mov eax, dword [ebp - 0x958]
mov ecx, dword [ebp + edx*4 - 0x920]
cmp ecx, dword [eax + 0x44]
jne 0x100419e1
jmp 0x100419e3
jmp 0x100419aa
mov edx, dword [ebp - 0x968]
cmp edx, dword [ebp - 0x924]
jne 0x10041a1f
cmp dword [ebp - 0x924], 0x40
jae 0x10041a1f
mov eax, dword [ebp - 0x968]
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0x44]
mov dword [ebp + eax*4 - 0x920], edx
mov eax, dword [ebp - 0x924]
add eax, 1
mov dword [ebp - 0x924], eax
xor ecx, ecx
jne 0x1004199e
mov dword [ebp - 0x970], 3
mov dword [ebp - 0x96c], 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 + 0x44]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x10041b35
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9a0], eax
movzx eax, word [ebp - 0x9a0]
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 0x10041b30
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041b30
mov eax, dword [ebp - 0x9a0]
push eax
push str.socks5_master_1.1_failed:__d
push 3
push 0x137
push 0x100cefe4
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
lea ecx, [ebp - 0x970]
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 0x10041bbe
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9a4], eax
movzx eax, word [ebp - 0x9a4]
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 0x10041bb9
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041bb9
mov eax, dword [ebp - 0x9a4]
push eax
push str.socks5_master_1.2_failed:__d
push 3
push 0x141
push 0x100cf03c
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
cmp dword [ebp - 0x95c], 0
jne 0x10041c29
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9a8], eax
movzx ecx, word [ebp - 0x9a8]
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 0x10041c24
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041c24
mov ecx, dword [ebp - 0x9a8]
push ecx
push str.socks5_master_1.3_failed:__d
push 3
push 0x149
push 0x100cf0e4
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
lea edx, [ebp - 0x924]
push edx
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0x44]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x10041ca5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9ac], eax
movzx edx, word [ebp - 0x9ac]
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 0x10041ca0
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041ca0
mov edx, dword [ebp - 0x9ac]
push edx
push str.socks5_master_1.4_failed:__d
push 3
push 0x151
push 0x100cf180
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
push 0
push 0x400
lea eax, [ebp - 0x810]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x10041d27
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9ec], eax
movzx eax, word [ebp - 0x9ec]
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 0x10041d22
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041d22
mov eax, dword [ebp - 0x9ec]
push eax
push str.socks5_master_1.5_failed:__d
push 3
push 0x15a
push 0x100cf210
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
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 0x10041d67
mov edx, 1
shl edx, 0
movsx eax, byte [ebp + edx - 0x810]
cmp eax, 0xff
jne 0x10041dc9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9e8], eax
movzx ecx, word [ebp - 0x9e8]
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 0x10041dc4
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041dc4
mov ecx, dword [ebp - 0x9e8]
push ecx
push str.socks5_master_1.6_failed:__d
push 3
push 0x166
push 0x100cf2b0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
push 0x400
push 0
lea edx, [ebp - 0x410]
push edx
call fcn.1009ee30
add esp, 0xc
mov ecx, dword [ebp - 0x958]
add ecx, 0x78
call fcn.10007200
mov dword [ebp - 0x980], eax
mov ecx, dword [ebp - 0x958]
add ecx, 0x90
call fcn.10007200
mov dword [ebp - 0x988], eax
mov eax, 1
imul ecx, eax, 0
mov byte [ebp + ecx - 0x410], 1
mov edx, 1
shl edx, 0
mov al, byte [ebp - 0x980]
mov byte [ebp + edx - 0x410], al
mov ecx, dword [ebp - 0x980]
push ecx
mov ecx, dword [ebp - 0x958]
add ecx, 0x78
call fcn.10007050
push eax
lea edx, [ebp - 0x40e]
push edx
call fcn.1009e8b0
add esp, 0xc
mov eax, dword [ebp - 0x980]
mov cl, byte [ebp - 0x988]
mov byte [ebp + eax - 0x40e], cl
mov edx, dword [ebp - 0x988]
push edx
mov ecx, dword [ebp - 0x958]
add ecx, 0x90
call fcn.10007050
push eax
mov eax, dword [ebp - 0x980]
lea ecx, [ebp + eax - 0x40d]
push ecx
call fcn.1009e8b0
add esp, 0xc
mov edx, dword [ebp - 0x988]
mov eax, dword [ebp - 0x980]
lea ecx, [eax + edx + 3]
mov dword [ebp - 0x9e4], ecx
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x960], 0
jmp 0x10041ed1
mov edx, dword [ebp - 0x960]
add edx, 1
mov dword [ebp - 0x960], edx
mov eax, dword [ebp - 0x960]
cmp eax, dword [ebp - 0x924]
jae 0x10041efb
mov ecx, dword [ebp - 0x960]
mov edx, dword [ebp - 0x958]
mov eax, dword [ebp + ecx*4 - 0x920]
cmp eax, dword [edx + 0x44]
jne 0x10041ef9
jmp 0x10041efb
jmp 0x10041ec2
mov ecx, dword [ebp - 0x960]
cmp ecx, dword [ebp - 0x924]
jne 0x10041f37
cmp dword [ebp - 0x924], 0x40
jae 0x10041f37
mov edx, dword [ebp - 0x960]
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0x44]
mov dword [ebp + edx*4 - 0x920], ecx
mov edx, dword [ebp - 0x924]
add edx, 1
mov dword [ebp - 0x924], edx
xor eax, eax
jne 0x10041eb6
mov dword [ebp - 0x970], 3
mov dword [ebp - 0x96c], 0
mov ecx, dword [ebp - 0x9e4]
push ecx
lea edx, [ebp - 0x410]
push edx
call fcn.10043c50
add esp, 8
push 0
mov eax, dword [ebp - 0x9e4]
push eax
lea ecx, [ebp - 0x410]
push ecx
mov edx, dword [ebp - 0x958]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x10041ff0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9e0], eax
movzx ecx, word [ebp - 0x9e0]
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 0x10041feb
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10041feb
mov ecx, dword [ebp - 0x9e0]
push ecx
push str.socks5_master_2.1_failed:__d
push 3
push 0x18a
push 0x100cf300
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
lea edx, [ebp - 0x970]
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 0x1004207b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9dc], eax
movzx ecx, word [ebp - 0x9dc]
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 0x10042076
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042076
mov ecx, dword [ebp - 0x9dc]
push ecx
push str.socks5_master_2.2_failed:__d
push 3
push 0x194
push 0x100cf350
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
cmp dword [ebp - 0x95c], 0
jne 0x100420e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9d4], eax
movzx edx, word [ebp - 0x9d4]
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 0x100420e1
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100420e1
mov edx, dword [ebp - 0x9d4]
push edx
push str.socks5_master_2.3_failed:__d
push 3
push 0x19c
push 0x100cf3a0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
lea eax, [ebp - 0x924]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0x44]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x10042160
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9d8], eax
movzx eax, word [ebp - 0x9d8]
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 0x1004215b
call dword [0x100fa7f8]
cmp eax, 3
jg 0x1004215b
mov eax, dword [ebp - 0x9d8]
push eax
push str.socks5_master_2.4_failed:__d
push 3
push 0x1a4
push 0x100cf3f0
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
push 0
push 0x400
lea ecx, [ebp - 0x810]
push ecx
mov edx, dword [ebp - 0x958]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x100421e4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9b0], eax
movzx ecx, word [ebp - 0x9b0]
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 0x100421df
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100421df
mov ecx, dword [ebp - 0x9b0]
push ecx
push str.socks5_master_2.5_failed:__d
push 3
push 0x1ad
push 0x100cf440
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
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 0x1004226e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9b4], eax
movzx edx, word [ebp - 0x9b4]
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 0x10042269
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042269
mov edx, dword [ebp - 0x9b4]
push edx
push str.socks5_master_2.6_failed:__d
push 3
push 0x1b9
push 0x100cf490
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
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 - 0x9b8], ecx
cmp dword [ebp - 0x9b8], 0x400
jae 0x100422bf
jmp 0x100422c4
call fcn.10086d4a
mov edx, dword [ebp - 0x9b8]
mov byte [ebp + edx - 0x410], 0
mov eax, 1
imul ecx, eax, 3
mov byte [ebp + ecx - 0x410], 1
mov dword [ebp - 0xa0c], 0
movzx edx, byte [ebp + 0x28]
test edx, edx
je 0x10042308
push 0x15b4
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x976], ax
jmp 0x1004231a
push 0x15b3
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x976], ax
mov ax, word [ebp - 0x976]
mov word [ebp - 0x984], ax
mov ecx, dword [ebp - 0xa0c]
mov dword [ebp - 0x40c], ecx
mov dx, word [ebp - 0x984]
mov word [ebp - 0x408], dx
mov dword [ebp - 0x924], 0
mov dword [ebp - 0x974], 0
jmp 0x10042367
mov eax, dword [ebp - 0x974]
add eax, 1
mov dword [ebp - 0x974], eax
mov ecx, dword [ebp - 0x974]
cmp ecx, dword [ebp - 0x924]
jae 0x10042391
mov edx, dword [ebp - 0x974]
mov eax, dword [ebp - 0x958]
mov ecx, dword [ebp + edx*4 - 0x920]
cmp ecx, dword [eax + 0x44]
jne 0x1004238f
jmp 0x10042391
jmp 0x10042358
mov edx, dword [ebp - 0x974]
cmp edx, dword [ebp - 0x924]
jne 0x100423cd
cmp dword [ebp - 0x924], 0x40
jae 0x100423cd
mov eax, dword [ebp - 0x974]
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0x44]
mov dword [ebp + eax*4 - 0x920], edx
mov eax, dword [ebp - 0x924]
add eax, 1
mov dword [ebp - 0x924], eax
xor ecx, ecx
jne 0x1004234c
mov dword [ebp - 0x970], 3
mov dword [ebp - 0x96c], 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 + 0x44]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1004247a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9bc], eax
movzx eax, word [ebp - 0x9bc]
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 0x10042475
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042475
mov eax, dword [ebp - 0x9bc]
push eax
push str.socks5_master_3.1_failed:__d
push 3
push 0x1d5
push 0x100cf540
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
lea ecx, [ebp - 0x970]
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 0x10042503
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9c0], eax
movzx eax, word [ebp - 0x9c0]
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 0x100424fe
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100424fe
mov eax, dword [ebp - 0x9c0]
push eax
push str.socks5_master_3.2_failed:__d
push 3
push 0x1df
push 0x100cf590
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
cmp dword [ebp - 0x95c], 0
jne 0x1004256e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9c4], eax
movzx ecx, word [ebp - 0x9c4]
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 0x10042569
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042569
mov ecx, dword [ebp - 0x9c4]
push ecx
push str.socks5_master_3.3_failed:__d
push 3
push 0x1e7
push 0x100cf63c
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
lea edx, [ebp - 0x924]
push edx
mov eax, dword [ebp - 0x958]
mov ecx, dword [eax + 0x44]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x100425ea
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9c8], eax
movzx edx, word [ebp - 0x9c8]
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 0x100425e5
call dword [0x100fa7f8]
cmp eax, 3
jg 0x100425e5
mov edx, dword [ebp - 0x9c8]
push edx
push str.socks5_master_3.4_failed:__d
push 3
push 0x1ef
push 0x100cf750
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
push 0
push 0x400
lea eax, [ebp - 0x810]
push eax
mov ecx, dword [ebp - 0x958]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x1004266c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9cc], eax
movzx eax, word [ebp - 0x9cc]
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 0x10042667
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042667
mov eax, dword [ebp - 0x9cc]
push eax
push str.socks5_master_3.5_failed:__d
push 3
push 0x203
push 0x100cf7d8
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
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 0x100426a9
mov edx, 1
shl edx, 0
movsx eax, byte [ebp + edx - 0x810]
test eax, eax
je 0x10042708
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x9d0], eax
movzx ecx, word [ebp - 0x9d0]
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 0x10042706
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042706
mov ecx, dword [ebp - 0x9d0]
push ecx
push str.socks5_master_3.6_failed:__d
push 3
push 0x20f
push str.acc_socks5agent.cpp
call dword [0x100fa800]
add esp, 0x14
jmp 0x10042729
mov dword [ebp - 0x9f0], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov eax, dword [ebp - 0x9f0]
jmp 0x10042753
mov ecx, dword [ebp - 0x958]
call fcn.10043bb0
mov dword [ebp - 0x9f4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov eax, dword [ebp - 0x9f4]
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