Function at 0x10029300
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 0x1008ad38
mov eax, dword fs:[0]
push eax
sub esp, 0x948
mov eax, dword [0x100a70c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x944], esi
mov edi, dword [ebp + 0x24]
push 6
mov dword [ebp - 4], 0
push 1
push 2
mov dword [edi], 0
mov dword [ebp - 0x950], 3
mov dword [ebp - 0x94c], 0
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, eax
lea eax, [esi + 0x44]
mov dword [ebp - 0x940], ecx
mov dword [ebp - 0x948], eax
cmp ecx, 0xffffffff
je 0x100293a6
add esi, 0x28
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x948]
mov ecx, dword [ebp - 0x940]
push esi
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x944]
mov eax, dword [ebp - 0x948]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x100293f9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx eax, ax
or eax, 0x10000
mov dword [edi], eax
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push str.socks5_master_create_socket_failed
push 3
push 0xdf
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x10
jmp 0x1002a3e9
lea ecx, [ebp - 0x954]
mov dword [ebp - 0x954], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x10029467
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx eax, ax
or eax, 0x20000
mov dword [edi], eax
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push str.socks5_master_ioctlsocket_failed
push 3
push 0xeb
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x10
jmp 0x1002a3e9
push dword [ebp + 0x20]
mov eax, 2
mov word [ebp - 0x838], ax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [esi + 0x70], 0xf
lea edx, [esi + 0x5c]
mov word [ebp - 0x836], ax
jbe 0x1002948e
mov edx, dword [edx]
mov ecx, edx
mov dword [ebp - 0x818], 0
xorps xmm0, xmm0
mov dword [ebp - 0x814], 0
movups xmmword [ebp - 0x828], xmm0
lea eax, [ecx + 1]
mov dword [ebp - 0x940], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100294b7
sub ecx, dword [ebp - 0x940]
push ecx
push edx
lea ecx, [ebp - 0x828]
call fcn.10003170
lea ecx, [ebp - 0x828]
call fcn.1001a940
mov ecx, dword [ebp - 0x814]
mov dword [ebp - 0x834], eax
cmp ecx, 0xf
jbe 0x10029522
mov edx, dword [ebp - 0x828]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10029512
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002a44d
push ecx
push edx
call fcn.10063674
mov eax, dword [ebp - 0x834]
add esp, 8
cmp eax, 0xffffffff
jne 0x10029629
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx ecx, ax
or ecx, 0x30000
mov dword [ebp - 0x940], eax
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x100295d6
call dword [0x10121130]
cmp eax, 3
jg 0x100295d6
lea edx, [esi + 0x5c]
lea ecx, [ebp - 0x828]
call fcn.1001b990
mov byte [ebp - 4], 1
cmp dword [eax + 0x14], 7
jbe 0x10029575
mov eax, dword [eax]
push dword [ebp - 0x940]
push eax
push str.socks5_master_inet_addr_failed:_s__d
push 3
push 0xf8
push str.acc_socks5agent.cpp
call dword [0x10121138]
mov ecx, dword [ebp - 0x814]
add esp, 0x18
cmp ecx, 7
jbe 0x100295d6
mov edx, dword [ebp - 0x828]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x100295cc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002a452
push ecx
push edx
call fcn.10063674
add esp, 8
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0xf
jbe 0x1002960a
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10029600
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002a448
push ecx
push edx
call fcn.10063674
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10063317
mov esp, ebp
pop ebp
ret 0x24
push 0x10
lea eax, [ebp - 0x838]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll_connect]
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xffffffff
jne 0x100296a1
call esi
mov dword [ebp - 0x940], eax
cmp eax, 0x2714
je 0x100296a1
cmp eax, 0x2733
je 0x100296a1
cmp eax, 0x2734
je 0x100296a1
movzx eax, ax
or eax, 0x40000
mov dword [edi], eax
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push dword [ebp - 0x940]
push str.socks5_master_0.1_failed:__d
push 3
push 0x102
jmp 0x1002a3db
mov eax, dword [ebp - 0x944]
mov dword [ebp - 0x93c], 1
mov eax, dword [eax + 0x44]
mov dword [ebp - 0x938], eax
lea eax, [ebp - 0x950]
push eax
push 0
lea eax, [ebp - 0x93c]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x10029716
call esi
mov esi, eax
movzx ecx, si
or ecx, 0x50000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_0.2_failed:__d
push 3
push 0x113
jmp 0x1002a3db
jne 0x10029756
call esi
mov esi, eax
movzx ecx, si
or ecx, 0x60000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_0.3_failed:__d
push 3
push 0x11b
jmp 0x1002a3db
lea eax, [ebp - 0x93c]
push eax
mov eax, dword [ebp - 0x944]
push dword [eax + 0x44]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x100297ae
call esi
mov esi, eax
movzx ecx, si
or ecx, 0x70000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_0.4_failed:__d
push 3
push 0x123
jmp 0x1002a3db
mov eax, dword [ebp - 0x944]
push 0x3fd
push 0
mov dword [ebp - 0x93c], 1
mov esi, dword [eax + 0x44]
lea eax, [ebp - 0x40d]
push eax
mov dword [ebp - 0x938], esi
mov dword [ebp - 0x950], 3
mov dword [ebp - 0x94c], 0
call fcn.10065910
push 0x400
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.10065910
add esp, 0x18
mov word [ebp - 0x410], 0xf7e9
lea eax, [ebp - 0x410]
mov byte [ebp - 0x40e], 0xf6
push 0
push 3
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1002986e
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x80000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_1.1_failed:__d
push 3
push 0x139
jmp 0x1002a3db
lea eax, [ebp - 0x950]
push eax
push 0
push 0
lea eax, [ebp - 0x93c]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x100298cf
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x90000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_1.2_failed:__d
push 3
push 0x143
jmp 0x1002a3db
jne 0x10029914
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0xa0000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_1.3_failed:__d
push 3
push 0x14b
jmp 0x1002a3db
mov esi, dword [ebp - 0x944]
lea eax, [ebp - 0x93c]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x10029971
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0xb0000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_1.4_failed:__d
push 3
push 0x153
jmp 0x1002a3db
push 0
push 0x400
lea eax, [ebp - 0x810]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x100299cf
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0xc0000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_1.5_failed:__d
push 3
push 0x15c
jmp 0x1002a3db
movaps xmm2, xmmword [0x1009c250]
xor ecx, ecx
cmp dword [0x10120904], 2
movaps xmm3, xmmword [0x1009c280]
jl 0x10029a92
movaps xmm4, xmmword [str._a_a_a_a]
xor eax, eax
nop word [eax + eax]
pmovzxbd xmm1, dword [ebp + eax - 0x810]
andnps xmm1, xmm3
xorps xmm0, xmm0
psubd xmm1, xmm4
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
xorps xmm0, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword [ebp + eax - 0x810], xmm1
pmovzxbd xmm1, dword [ebp + eax - 0x80c]
andnps xmm1, xmm3
psubd xmm1, xmm4
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword [ebp + eax - 0x80c], xmm1
add eax, 8
cmp eax, 0x400
jb 0x10029a00
jmp 0x10029abd
movzx eax, byte [ebp + ecx - 0x810]
not eax
sub eax, 7
and eax, 0x800000ff
jns 0x10029aad
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp + ecx - 0x810], al
inc ecx
cmp ecx, 0x400
jb 0x10029a92
cmp byte [ebp - 0x810], 5
jne 0x1002a3a5
push 0x3fe
lea eax, [ebp - 0x40e]
push 0
push eax
call fcn.10065910
mov eax, esi
mov byte [ebp - 0x410], 1
add esp, 0xc
mov ecx, dword [eax + 0x84]
mov edx, dword [eax + 0x9c]
add eax, 0x74
mov dword [ebp - 0x940], ecx
mov dword [ebp - 0x948], edx
mov byte [ebp - 0x40f], cl
cmp dword [eax + 0x14], 0xf
jbe 0x10029b12
mov eax, dword [eax]
push ecx
push eax
lea eax, [ebp - 0x40e]
push eax
call fcn.10065380
mov eax, dword [ebp - 0x940]
lea ecx, [esi + 0x8c]
mov edx, dword [ebp - 0x948]
add esp, 0xc
cmp dword [ecx + 0x14], 0xf
mov byte [ebp + eax - 0x40e], dl
jbe 0x10029b44
mov ecx, dword [ecx]
push edx
push ecx
lea ecx, [ebp - 0x40d]
add eax, ecx
push eax
call fcn.10065380
mov eax, dword [esi + 0x84]
xor ecx, ecx
mov edx, dword [esi + 0x9c]
add eax, 3
add esp, 0xc
mov dword [ebp - 0x93c], 1
add edx, eax
mov dword [ebp - 0x950], 3
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x938], eax
mov dword [ebp - 0x94c], ecx
je 0x10029c88
cmp edx, 8
jb 0x10029c71
cmp dword [0x10120904], 2
jl 0x10029c71
movaps xmm4, xmmword [str._a_a_a_a]
mov eax, edx
movaps xmm2, xmmword [0x1009c250]
and eax, 7
movaps xmm3, xmmword [0x1009c280]
mov dword [ebp - 0x948], edx
sub dword [ebp - 0x948], eax
mov eax, dword [ebp - 0x948]
nop word [eax + eax]
pmovzxbd xmm1, dword [ebp + ecx - 0x410]
paddd xmm1, xmm4
xorps xmm0, xmm0
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
xorps xmm0, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
andnps xmm1, xmm3
movd dword [ebp + ecx - 0x410], xmm1
pmovzxbd xmm1, dword [ebp + ecx - 0x40c]
paddd xmm1, xmm4
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
andnps xmm1, xmm3
movd dword [ebp + ecx - 0x40c], xmm1
add ecx, 8
cmp ecx, eax
jb 0x10029be0
cmp ecx, edx
jae 0x10029c88
mov al, byte [ebp + ecx - 0x410]
add al, 7
not al
mov byte [ebp + ecx - 0x410], al
inc ecx
cmp ecx, edx
jb 0x10029c71
push 0
push edx
lea eax, [ebp - 0x410]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x10029ce3
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0xe0000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_2.1_failed:__d
push 3
push 0x18c
jmp 0x1002a3db
lea eax, [ebp - 0x950]
push eax
push 0
push 0
lea eax, [ebp - 0x93c]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x10029d44
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0xf0000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_2.2_failed:__d
push 3
push 0x196
jmp 0x1002a3db
jne 0x10029d89
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x100000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_2.3_failed:__d
push 3
push 0x19e
jmp 0x1002a3db
lea eax, [ebp - 0x93c]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x10029de0
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x110000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_2.4_failed:__d
push 3
push 0x1a6
jmp 0x1002a3db
push 0
push 0x400
lea eax, [ebp - 0x810]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x10029e3e
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x120000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_2.5_failed:__d
push 3
push 0x1af
jmp 0x1002a3db
xor ecx, ecx
cmp dword [0x10120904], 2
jl 0x10029f02
movaps xmm4, xmmword [str._a_a_a_a]
xor eax, eax
movaps xmm2, xmmword [0x1009c250]
movaps xmm3, xmmword [0x1009c280]
nop dword [eax]
nop dword [eax + eax]
pmovzxbd xmm1, dword [ebp + eax - 0x810]
andnps xmm1, xmm3
xorps xmm0, xmm0
psubd xmm1, xmm4
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
xorps xmm0, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword [ebp + eax - 0x810], xmm1
pmovzxbd xmm1, dword [ebp + eax - 0x80c]
andnps xmm1, xmm3
psubd xmm1, xmm4
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword [ebp + eax - 0x80c], xmm1
add eax, 8
cmp eax, 0x400
jb 0x10029e70
jmp 0x10029f2d
movzx eax, byte [ebp + ecx - 0x810]
not eax
sub eax, 7
and eax, 0x800000ff
jns 0x10029f1d
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp + ecx - 0x810], al
inc ecx
cmp ecx, 0x400
jb 0x10029f02
cmp byte [ebp - 0x80f], 0
je 0x10029f79
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x130000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_2.6_failed:__d
push 3
push 0x1bb
jmp 0x1002a3db
push 0x3fc
lea eax, [ebp - 0x40c]
push 0
push eax
call fcn.10065910
mov eax, dword [sym.imp.WS2_32.dll_htons]
add esp, 0xc
cmp byte [ebp + 0x28], 0
mov dword [ebp - 0x410], 0x1000105
je 0x10029fab
push 0x15b4
jmp 0x10029fb0
push 0x15b3
call eax
movzx edx, ax
mov al, byte [ebp - 0x410]
add al, 7
mov dword [ebp - 0x40c], 0
not al
mov ecx, dword [esi + 0x44]
mov byte [ebp - 0x410], al
mov al, byte [ebp - 0x40f]
add al, 7
mov word [ebp - 0x408], dx
not al
mov dword [ebp - 0x938], ecx
mov byte [ebp - 0x40f], al
add dl, 7
mov al, byte [ebp - 0x40e]
not dl
add al, 7
mov dword [ebp - 0x93c], 1
not al
mov dword [ebp - 0x950], 3
mov byte [ebp - 0x40e], al
mov al, byte [ebp - 0x40d]
add al, 7
mov dword [ebp - 0x94c], 0
not al
mov byte [ebp - 0x40c], 0xf8
mov byte [ebp - 0x40d], al
mov al, byte [ebp - 0x40b]
add al, 7
mov byte [ebp - 0x408], dl
not al
mov byte [ebp - 0x40b], al
mov al, byte [ebp - 0x40a]
add al, 7
not al
mov byte [ebp - 0x40a], al
mov al, byte [ebp - 0x409]
add al, 7
not al
mov byte [ebp - 0x409], al
mov al, byte [ebp - 0x407]
add al, 7
not al
push 0
mov byte [ebp - 0x407], al
lea eax, [ebp - 0x410]
push 0xa
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1002a0d9
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x140000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_3.1_failed:__d
push 3
push 0x1d7
jmp 0x1002a3db
lea eax, [ebp - 0x950]
push eax
push 0
push 0
lea eax, [ebp - 0x93c]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x1002a13a
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x150000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_3.2_failed:__d
push 3
push 0x1e1
jmp 0x1002a3db
jne 0x1002a17f
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x160000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_3.3_failed:__d
push 3
push 0x1e9
jmp 0x1002a3db
lea eax, [ebp - 0x93c]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x1002a1d6
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x170000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_3.4_failed:__d
push 3
push 0x1f1
jmp 0x1002a3db
push 0
push 0x400
lea eax, [ebp - 0x810]
push eax
push dword [esi + 0x44]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x1002a234
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x180000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_3.5_failed:__d
push 3
push 0x205
jmp 0x1002a3db
xor ecx, ecx
cmp dword [0x10120904], 2
jl 0x1002a2f2
movaps xmm4, xmmword [str._a_a_a_a]
xor eax, eax
movaps xmm2, xmmword [0x1009c250]
movaps xmm3, xmmword [0x1009c280]
nop word [eax + eax]
pmovzxbd xmm1, dword [ebp + eax - 0x810]
andnps xmm1, xmm3
xorps xmm0, xmm0
psubd xmm1, xmm4
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
xorps xmm0, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword [ebp + eax - 0x810], xmm1
pmovzxbd xmm1, dword [ebp + eax - 0x80c]
andnps xmm1, xmm3
psubd xmm1, xmm4
pcmpgtd xmm0, xmm1
andps xmm0, xmm2
paddd xmm0, xmm1
psrad xmm0, 8
pslld xmm0, 8
psubd xmm1, xmm0
andps xmm1, xmm2
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd dword [ebp + eax - 0x80c], xmm1
add eax, 8
cmp eax, 0x400
jb 0x1002a260
jmp 0x1002a31d
movzx eax, byte [ebp + ecx - 0x810]
not eax
sub eax, 7
and eax, 0x800000ff
jns 0x1002a30d
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp + ecx - 0x810], al
inc ecx
cmp ecx, 0x400
jb 0x1002a2f2
cmp byte [ebp - 0x810], 5
jne 0x1002a36d
cmp byte [ebp - 0x80f], 0
jne 0x1002a36d
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0xf
jbe 0x1002a363
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1002a359
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002a448
push ecx
push edx
call fcn.10063674
add esp, 8
mov eax, 1
jmp 0x1002960c
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0x190000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_3.6_failed:__d
push 3
push 0x211
jmp 0x1002a3db
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov esi, eax
movzx ecx, si
or ecx, 0xd0000
mov dword [edi], ecx
call dword [0x10121134]
test al, al
je 0x1002a3e9
call dword [0x10121130]
cmp eax, 3
jg 0x1002a3e9
push esi
push str.socks5_master_1.6_failed:__d
push 3
push 0x168
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x14
mov edi, dword [ebp - 0x944]
lea esi, [edi + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x1002a408
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
mov dword [edi + 0x44], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0xf
jbe 0x1002960a
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10029600
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10029600
call fcn.1006dd1f
call fcn.1006dd1f
call fcn.1006dd1f
int3