Function at 0x1002ad50
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 0x1002b0fd
nop word [eax + eax]
cmp byte [ebx + 0xa8], 0
jne 0x1002aef9
call esi
sub eax, dword [ebp - 0x518]
cmp eax, 0x3a98
jbe 0x1002adff
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 0x1002af30
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 0x1002aea3
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
sub eax, dword [ebp - 0x51c]
cmp eax, 0xafc8
jbe 0x1002aeec
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 0x1002afaf
cmp byte [ebx + 0xa8], 0
jne 0x1002afaf
mov edi, 3
jmp 0x1002afb1
js 0x1002b07a
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.10065890
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 0x1002aff7
call esi
mov dword [ebp - 0x51c], eax
cmp byte [ebx + 0xa9], 0
je 0x1002adb0
xor edi, edi
mov eax, dword [ebp - 0x50c]
cmp byte [ebx + 0xa9], 0
jne 0x1002b0fd
cmp byte [ebx + 0xa8], 0
jne 0x1002b0fd
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10063277
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 0x1002af67
cmp byte [ebx + 0xa8], 0
jne 0x1002af67
mov edi, 1
jmp 0x1002af69
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aefb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af01
push dword [eax]
push dword [ebp - 0x514]
push 0x10099460
push 3
push 0x2ef
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aefb
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aefb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af01
push dword [eax]
push 0
push 0x100994b0
push 3
push 0x303
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aefb
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 0x1002b02e
cmp byte [ebx + 0xa8], 0
jne 0x1002b02e
mov edi, 3
jmp 0x1002b030
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aefb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af01
push dword [eax]
push dword [ebp - 0x514]
push 0x10099548
push 3
push 0x31a
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aefb
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 0x1002b0b1
cmp byte [ebx + 0xa8], 0
jne 0x1002b0b1
mov edi, 2
jmp 0x1002b0b3
xor edi, edi
call dword [0x10121134]
test al, al
je 0x1002aefb
call dword [0x10121130]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af01
push dword [eax]
push dword [ebp - 0x514]
push 0x100994f8
push 3
push 0x30f
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
jmp 0x1002aefb
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 0x1002b14f
call dword [0x10121130]
cmp eax, 1
jg 0x1002b14f
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.10063277
mov esp, ebp
pop ebp
ret 4