Function at 0x4b2cf0
Capabilities:
Check for time delay via gettickcount
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x5c1334]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x160], ecx
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov eax, dword [ecx + eax*4 + 0x154]
mov edi, dword [ecx]
mov dword [ebp - 0x168], eax
mov eax, 0x493e0
mov dword [ebp - 0x15c], eax
xor eax, eax
mov dword [ebp - 0x164], ecx
mov ecx, dword [edi + 0x220]
test ecx, ecx
mov dword [ebp - 8], edx
mov edx, dword [ebp + 0x14]
setg al
mov dword [ebp - 0x16c], edx
mov edx, dword [edi + 0x224]
mov dword [ebp - 0x174], edi
test edx, edx
jle 0x4b2d5e
or eax, 2
sub eax, 1
je 0x4b2d84
sub eax, 1
je 0x4b2d7c
sub eax, 1
jne 0x4b2d8a
cmp ecx, edx
mov eax, ecx
cmovge eax, edx
mov dword [ebp - 0x15c], eax
jmp 0x4b2d8a
mov dword [ebp - 0x15c], edx
jmp 0x4b2d8a
mov dword [ebp - 0x15c], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov edi, dword [edi + 0x570]
mov eax, 0x10624dd3
mul esi
mov eax, 0x10624dd3
mov ebx, edx
shr ebx, 6
imul ecx, ebx, 0x3e8
sub edi, ebx
sub esi, ecx
imul ecx, esi, 0x3e8
mov esi, dword [ebp - 0x174]
sub ecx, dword [esi + 0x574]
imul ecx
imul eax, edi, 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
mov ecx, dword [ebp - 0x15c]
add ecx, eax
je 0x4b337a
test ecx, ecx
js 0x4b337a
lea eax, [ebp - 0x170]
mov dword [ebp - 0x170], 0
push eax
push 0x8004667e
push dword [ebp - 0x168]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp + 8]
mov ebx, dword [ebp - 8]
push ebx
push str.SOCKS4_communication_to__s:_d_n
push esi
call fcn.00494040
mov ecx, dword [ebp + 8]
add esp, 0x10
mov eax, ecx
mov word [ebp - 0x118], 0x104
sar eax, 8
cmp dword [ebp - 0x16c], 0
mov byte [ebp - 0x116], al
mov byte [ebp - 0x115], cl
jne 0x4b2f73
mov edi, dword [ebp - 0x164]
lea eax, [ebp - 0x15c]
push eax
push ecx
mov edx, ebx
mov ecx, edi
call fcn.004971f0
add esp, 8
cmp eax, 0xffffffff
jne 0x4b2e85
mov eax, 5
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x4b2e97
lea edx, [ebp - 0x15c]
mov ecx, edi
call fcn.004a1140
mov eax, dword [ebp - 0x15c]
test eax, eax
je 0x4b2f4e
mov edi, dword [eax]
test edi, edi
je 0x4b2f4e
mov eax, dword [edi + 4]
sub eax, 2
jne 0x4b2ed3
mov edx, dword [edi + 0x18]
lea eax, [ebp - 0x158]
push 0x40
push eax
add edx, 4
mov ecx, 2
call fcn.004ade60
add esp, 8
lea eax, [ebp - 6]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xa]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x158]
push str._hu._hu._hu._hu
push eax
call fcn.00476140
add esp, 0x18
cmp eax, 4
jne 0x4b2f26
movzx eax, byte [ebp - 0xc]
mov byte [ebp - 0x114], al
movzx eax, byte [ebp - 0xa]
mov byte [ebp - 0x113], al
movzx eax, byte [ebp - 8]
mov byte [ebp - 0x112], al
movzx eax, byte [ebp - 6]
mov byte [ebp - 0x111], al
jmp 0x4b2f28
xor edi, edi
lea eax, [ebp - 0x158]
push eax
push str.SOCKS4_connect_to__s__locally_resolved__n
push esi
call fcn.00494040
mov edx, dword [ebp - 0x15c]
add esp, 0xc
mov ecx, esi
call fcn.00497480
test edi, edi
jne 0x4b2f73
push ebx
push str.Failed_to_resolve___s__for_SOCKS4_connect.
push esi
call fcn.00494100
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x160]
mov byte [ebp - 0x110], 0
test edx, edx
je 0x4b2fd9
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b2f90
sub ecx, edi
cmp ecx, 0xfe
jb 0x4b2fc5
push str.Too_long_SOCKS_proxy_name__cant_use__n
push esi
call fcn.00494100
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
lea eax, [ecx + 1]
push eax
push edx
lea eax, [ebp - 0x110]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea ecx, [ebp - 0x110]
xor edi, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b2fe4
sub ecx, edx
lea edx, [ecx + 9]
mov dword [ebp - 0x15c], edx
cmp dword [ebp - 0x16c], edi
je 0x4b304b
mov ecx, ebx
mov dword [ebp - 0x114], 0x1000000
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b3010
sub ecx, edi
lea edi, [ecx + 1]
lea eax, [edx + edi]
cmp eax, 0x106
jg 0x4b3049
mov eax, edx
mov ecx, ebx
sub eax, ebx
lea edx, [ebp - 0x118]
add edx, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4b3034
mov edx, dword [ebp - 0x15c]
jmp 0x4b304b
xor edi, edi
mov ecx, dword [ebp - 0x164]
xor eax, eax
mov esi, dword [ebp - 0x168]
cmp esi, dword [ecx + 0x158]
lea esi, [ebp - 0x160]
push esi
sete al
add edx, edi
push edx
lea edx, [ebp - 0x118]
push edx
push eax
push ecx
call fcn.004943e0
mov esi, dword [ebp - 0x174]
add esp, 0x14
cmp dword [ebp - 0x160], 0
mov ecx, eax
mov dword [ebp - 0x170], ecx
jne 0x4b30f5
mov eax, dword [ebp - 0x15c]
add eax, edi
cmp ecx, eax
jne 0x4b30f5
cmp dword [ebp - 0x16c], 0
je 0x4b3119
test edi, edi
jne 0x4b3119
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b30b2
mov edi, dword [ebp - 0x164]
sub ecx, edx
mov edx, dword [ebp - 0x168]
lea eax, [ecx + 1]
lea ecx, [ebp - 0x170]
mov dword [ebp - 0x160], eax
push ecx
push eax
push ebx
mov ecx, edi
call fcn.00494470
add esp, 0xc
test eax, eax
jne 0x4b30f5
mov eax, dword [ebp - 0x160]
cmp dword [ebp - 0x170], eax
je 0x4b311f
push str.Failed_to_send_SOCKS4_connect_request.
push esi
call fcn.00494100
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x164]
mov edx, dword [ebp - 0x168]
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x118]
mov ecx, edi
push 8
push eax
call fcn.004b2ba0
add esp, 0xc
test eax, eax
jne 0x4b3356
cmp dword [ebp - 0x160], 8
jne 0x4b3356
cmp byte [ebp - 0x118], al
je 0x4b3180
push str.SOCKS4_reply_has_wrong_version__version_should_be_4.
push esi
call fcn.00494100
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebp - 0x117]
lea ecx, [eax - 0x5a]
cmp ecx, 3
ja case.default.0x4b3193
jmp dword [ecx*4 + 0x4b33a0]
cmp dword [ebp - 0x16c], 0
mov ecx, 0x5950c6
mov eax, 0x59ccb8
cmove eax, ecx
push eax
push str.SOCKS4_s_request_granted._n
push esi
call fcn.00494040
add esp, 0xc
mov dword [ebp - 0x160], 1
lea eax, [ebp - 0x160]
push eax
push 0x8004667e
push dword [ebp - 0x168]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_or_failed.
push esi
call fcn.00494100
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_SOCKS_server_cannot_connect_to_identd_on_the_client.
push esi
call fcn.00494100
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_the_client_program_and_identd_report_different_user_ids.
push esi
call fcn.00494100
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___Unknown.
push esi
call fcn.00494100
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
push str.Failed_to_receive_SOCKS4_connect_request_ack.
push esi
call fcn.00494100
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
push str.Connection_time_out
push esi
call fcn.00494100
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x1c
pop edi
pop esi
pop ebx
call fcn.00528802
mov esp, ebp
pop ebp
ret