Function at 0x1002ad10
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x524
mov eax, dword [0x100a70c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, ecx
push edi
mov dword [ebp - 0x50c], eax
xor edi, edi
mov word [ebp - 0x510], 0x2a
call esi
mov dword [ebp - 0x518], eax
call esi
mov dword [ebp - 0x51c], eax
mov eax, dword [ebp - 0x50c]
mov dword [eax], edi
cmp byte [ebx + 0xa9], 0
jne 0x1002b0bd
nop word [eax + eax]
cmp byte [ebx + 0xa8], 0
jne 0x1002aeb9
call esi
sub eax, dword [ebp - 0x518]
cmp eax, 0x3a98
jbe 0x1002adbf
call esi
push 0
mov dword [ebp - 0x518], eax
lea eax, [ebp - 0x510]
push 2
push eax
push dword [ebx + 0x44]
mov word [ebp - 0x510], 0xf8ce
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x514], eax
test eax, eax
jle 0x1002aef0
mov eax, dword [ebx + 0x44]
mov dword [ebp - 0x504], eax
lea eax, [ebp - 0x524]
push eax
push 0
push 0
lea eax, [ebp - 0x508]
mov dword [ebp - 0x508], 1
push eax
push 0
mov dword [ebp - 0x524], 3
mov dword [ebp - 0x520], edi
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x514], eax
test eax, eax
jne 0x1002ae63
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
sub eax, dword [ebp - 0x51c]
cmp eax, 0xafc8
jbe 0x1002aeac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002af6f
cmp byte [ebx + 0xa8], 0
jne 0x1002af6f
mov edi, 3
jmp 0x1002af71
js 0x1002b03a
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.10065930
add esp, 0xc
lea eax, [ebp - 0x404]
push 0
push 0x400
push eax
push dword [ebx + 0x44]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x514], eax
test eax, eax
jle 0x1002afb7
call esi
mov dword [ebp - 0x51c], eax
cmp byte [ebx + 0xa9], 0
je 0x1002ad70
xor edi, edi
mov eax, dword [ebp - 0x50c]
cmp byte [ebx + 0xa9], 0
jne 0x1002b0bd
cmp byte [ebx + 0xa8], 0
jne 0x1002b0bd
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10063337
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002af27
cmp byte [ebx + 0xa8], 0
jne 0x1002af27
mov edi, 1
jmp 0x1002af29
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aebb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002aec1
push dword [eax]
push dword [ebp - 0x514]
push 0x100994d8
push 3
push 0x2ef
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aebb
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aebb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002aec1
push dword [eax]
push 0
push 0x10099528
push 3
push 0x303
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aebb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002afee
cmp byte [ebx + 0xa8], 0
jne 0x1002afee
mov edi, 3
jmp 0x1002aff0
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aebb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002aec1
push dword [eax]
push dword [ebp - 0x514]
push 0x100995c0
push 3
push 0x31a
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aebb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002b071
cmp byte [ebx + 0xa8], 0
jne 0x1002b071
mov edi, 2
jmp 0x1002b073
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aebb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002aec1
push dword [eax]
push dword [ebp - 0x514]
push 0x10099570
push 3
push 0x30f
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aebb
push 0
mov dword [eax], 0
lea eax, [ebp - 0x510]
push 2
push eax
push dword [ebx + 0x44]
mov word [ebp - 0x510], 0xf7ce
call dword [sym.imp.WS2_32.dll_send]
call dword [0x10121134]
test al, al
je 0x1002b10f
call dword [0x10121130]
cmp eax, 1
jg 0x1002b10f
push str._MASTER
push 1
push 0x32d
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x10
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10063337
mov esp, ebp
pop ebp
ret 4