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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x5c1334]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x274], ecx
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 0x278], ecx
mov ecx, dword [eax + ecx*4 + 0x154]
push edi
mov edi, dword [eax]
mov dword [ebp - 0x288], edx
mov edx, dword [eax + 0x138]
mov dword [ebp - 0x27c], eax
xor eax, eax
mov dword [ebp - 0x270], ecx
cmp edx, 5
mov ecx, ebx
mov dword [ebp - 0x284], ebx
sete al
mov dword [ebp - 0x264], edi
mov dword [ebp - 0x28c], eax
lea esi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b3420
sub ecx, esi
mov dword [ebp - 0x280], ecx
cmp edx, 5
je 0x4b3455
cmp ecx, 0xff
jbe 0x4b3455
push ecx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push edi
call fcn.00494040
add esp, 0xc
mov dword [ebp - 0x28c], 1
mov ecx, dword [edi + 0x220]
mov eax, 0x493e0
mov edx, dword [edi + 0x224]
mov dword [ebp - 0x26c], eax
xor eax, eax
test ecx, ecx
setg al
test edx, edx
jle 0x4b347a
or eax, 2
sub eax, 1
je 0x4b34a0
sub eax, 1
je 0x4b3498
sub eax, 1
jne 0x4b34a6
cmp ecx, edx
mov eax, ecx
cmovge eax, edx
mov dword [ebp - 0x26c], eax
jmp 0x4b34a6
mov dword [ebp - 0x26c], edx
jmp 0x4b34a6
mov dword [ebp - 0x26c], 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 - 0x264]
sub ecx, dword [esi + 0x574]
imul ecx
imul eax, edi, 0x3e8
mov edi, dword [ebp - 0x26c]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
add edi, eax
je 0x4b3e8e
test edi, edi
js 0x4b3e8e
mov ebx, dword [ebp - 0x270]
lea eax, [ebp - 0x264]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 0x264], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push edi
push ebx
or edx, 0xffffffff
or ecx, 0xffffffff
call fcn.004965b0
add esp, 8
cmp eax, 0xffffffff
jne 0x4b356e
mov eax, dword [ebp - 0x27c]
push str.SOCKS5:_no_connection_here
push dword [eax]
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
test eax, eax
jne 0x4b3584
mov eax, dword [ebp - 0x27c]
push str.SOCKS5:_connection_timeout
push dword [eax]
jmp 0x4b3e94
test al, 4
je 0x4b35b3
mov eax, dword [ebp - 0x27c]
push str.SOCKS5:_error_occurred_during_connection
push dword [eax]
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
cmp dword [ebp - 0x274], 0
mov byte [ebp - 0x260], 5
setne al
mov word [ebp - 0x25e], 0x100
add al, 2
mov byte [ebp - 0x25c], 2
mov byte [ebp - 0x25f], al
lea eax, [ebp - 0x264]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 0x264], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x26c]
mov edx, ebx
mov ebx, dword [ebp - 0x27c]
mov ecx, ebx
push eax
movzx eax, byte [ebp - 0x25f]
add eax, 2
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.00494470
add esp, 0xc
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4b3e6a
movzx ecx, byte [ebp - 0x25f]
add ecx, 2
cmp dword [ebp - 0x26c], ecx
jne 0x4b3e6a
lea eax, [ebp - 0x268]
mov dword [ebp - 0x268], 1
push eax
push 0x8004667e
push dword [ebp - 0x270]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push edi
mov edi, dword [ebp - 0x270]
or edx, 0xffffffff
push 0xffffffffffffffff
mov ecx, edi
call fcn.004965b0
add esp, 8
cmp eax, 0xffffffff
jne 0x4b36aa
push str.SOCKS5_nothing_to_read
push dword [ebx]
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
test eax, eax
jne 0x4b36ba
push str.SOCKS5_read_timeout
push dword [ebx]
jmp 0x4b3e94
test al, 4
je 0x4b36e3
push str.SOCKS5_read_error_occurred
push dword [ebx]
call fcn.00494100
mov eax, 0x38
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, [ebp - 0x268]
mov dword [ebp - 0x268], 0
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x268]
mov edx, edi
push eax
lea eax, [ebp - 0x260]
mov ecx, ebx
push 2
push eax
call fcn.004b2ba0
add esp, 0xc
test eax, eax
jne 0x4b3e46
cmp dword [ebp - 0x268], 2
jne 0x4b3e46
cmp byte [ebp - 0x260], 5
je 0x4b375e
push str.Received_invalid_version_in_initial_SOCKS5_response.
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 al, byte [ebp - 0x25f]
test al, al
je 0x4b39ba
cmp al, 1
jne 0x4b37af
mov ecx, dword [ebp - 0x278]
mov edx, ebx
call fcn.004cff40
mov dword [ebp - 0x264], eax
test eax, eax
je 0x4b39ba
push str.Unable_to_negotiate_SOCKS5_gssapi_context.
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
cmp al, 2
jne 0x4b3959
mov edx, dword [ebp - 0x274]
test edx, edx
je 0x4b37fd
cmp dword [ebp - 0x288], 0
je 0x4b37fd
mov ebx, edx
lea ecx, [ebx + 1]
nop
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4b37d0
sub ebx, ecx
mov ecx, dword [ebp - 0x288]
lea eax, [ecx + 1]
mov dword [ebp - 0x278], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b37e8
sub ecx, dword [ebp - 0x278]
mov dword [ebp - 0x264], ecx
jmp 0x4b3805
xor ebx, ebx
mov dword [ebp - 0x264], ebx
mov byte [ebp - 0x260], 1
mov byte [ebp - 0x25f], bl
test edx, edx
je 0x4b382b
test ebx, ebx
je 0x4b382b
push ebx
push edx
lea eax, [ebp - 0x25e]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x288]
mov eax, dword [ebp - 0x264]
mov byte [ebp + ebx - 0x25e], al
test ecx, ecx
je 0x4b385e
test eax, eax
je 0x4b385e
push eax
push ecx
lea eax, [ebp + ebx - 0x25d]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x264]
add esp, 0xc
add ebx, 3
lea ecx, [ebp - 0x26c]
add eax, ebx
mov edx, edi
mov ebx, dword [ebp - 0x27c]
push ecx
push eax
mov dword [ebp - 0x278], eax
mov ecx, ebx
lea eax, [ebp - 0x260]
push eax
call fcn.00494470
add esp, 0xc
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4b3935
mov eax, dword [ebp - 0x278]
cmp eax, dword [ebp - 0x26c]
jne 0x4b3935
lea eax, [ebp - 0x268]
mov edx, edi
push eax
lea eax, [ebp - 0x260]
mov ecx, ebx
push 2
push eax
call fcn.004b2ba0
add esp, 0xc
test eax, eax
jne 0x4b3911
cmp dword [ebp - 0x268], 2
jne 0x4b3911
mov al, byte [ebp - 0x25f]
test al, al
je 0x4b39ba
movzx eax, al
push eax
movzx eax, byte [ebp - 0x260]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push esi
call fcn.00494100
add esp, 0x10
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.Unable_to_receive_SOCKS5_sub_negotiation_response.
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.Failed_to_send_SOCKS5_sub_negotiation_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
cmp al, 0xff
jne 0x4b3996
mov eax, dword [ebp - 0x274]
test eax, eax
je 0x4b3971
cmp byte [eax], 0
mov eax, str.No_authentication_method_was_acceptable.
jne 0x4b3976
mov eax, str.No_authentication_method_was_acceptable.__It_is_quite_likely_that_the_SOCKS5_server_wanted_a_username_password__since_none_was_supplied_to_the_server_on_this_connection._
push eax
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.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
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
cmp dword [ebp - 0x28c], 0
mov edi, 3
mov word [ebp - 0x260], 0x105
mov byte [ebp - 0x25e], 0
jne 0x4b3a0f
mov eax, dword [ebp - 0x280]
push eax
push dword [ebp - 0x284]
mov byte [ebp - 0x25c], al
lea eax, [ebp - 0x25b]
push eax
mov byte [ebp - 0x25d], 3
call sub.VCRUNTIME140.dll_memcpy
mov edi, dword [ebp - 0x280]
add esp, 0xc
add edi, 5
jmp 0x4b3af2
mov edx, dword [ebp - 0x284]
lea eax, [ebp - 0x274]
push eax
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.004971f0
add esp, 8
cmp eax, 0xffffffff
je 0x4b3e30
cmp eax, 1
jne 0x4b3a52
lea edx, [ebp - 0x274]
mov ecx, ebx
call fcn.004a1140
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4b3ea1
mov eax, dword [ebp - 0x274]
test eax, eax
je 0x4b3e1c
mov eax, dword [eax]
mov dword [ebp - 0x280], eax
test eax, eax
je 0x4b3e1c
cmp dword [eax + 4], 2
jne 0x4b3ace
mov byte [ebp - 0x25d], 1
lea ecx, [ebp - 0x25c]
mov ebx, dword [eax + 0x18]
mov edi, 4
sub ebx, ecx
lea ecx, [ebp - 0x25d]
add ebx, edi
lea eax, [ebx + edi]
mov al, byte [ebp + eax - 0x260]
mov byte [ebp + edi - 0x260], al
inc edi
movzx eax, byte [ecx + edi - 4]
push eax
push 0x59d1f4
push esi
call fcn.00494040
add esp, 0xc
lea ecx, [ebp - 0x25d]
cmp edi, 8
jl 0x4b3a95
mov ebx, dword [ebp - 0x27c]
jmp 0x4b3ad8
mov dword [ebp - 0x280], 0
mov edx, dword [ebp - 0x274]
mov ecx, esi
call fcn.00497480
cmp dword [ebp - 0x280], 0
je 0x4b3e1c
mov ecx, dword [ebp + 0xc]
mov eax, ecx
sar eax, 8
mov byte [ebp + edi - 0x260], al
mov byte [ebp + edi - 0x25f], cl
add edi, 2
cmp dword [ebx + 0x5a8], 0
je 0x4b3b2a
push str.SOCKS5_gssapi_protection_not_yet_implemented.
push esi
call fcn.00494100
mov eax, dword [ebp - 0x264]
add esp, 8
jmp 0x4b3b49
mov edx, dword [ebp - 0x270]
lea eax, [ebp - 0x26c]
push eax
lea eax, [ebp - 0x260]
mov ecx, ebx
push edi
push eax
call fcn.00494470
add esp, 0xc
test eax, eax
jne 0x4b3df8
cmp edi, dword [ebp - 0x26c]
jne 0x4b3df8
lea edi, [eax + 0xa]
cmp dword [ebx + 0x5a8], eax
je 0x4b3b9a
push str.SOCKS5_gssapi_protection_not_yet_implemented.
push esi
call fcn.00494100
add esp, 8
push str.Failed_to_receive_SOCKS5_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
mov edx, dword [ebp - 0x270]
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x260]
mov ecx, ebx
push 0xa
push eax
call fcn.004b2ba0
add esp, 0xc
test eax, eax
jne 0x4b3b76
cmp dword [ebp - 0x268], edi
jne 0x4b3b76
cmp byte [ebp - 0x260], 5
je 0x4b3bf3
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
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 ah, byte [ebp - 0x25f]
mov al, byte [ebp - 0x25d]
test ah, ah
je 0x4b3d65
cmp al, 1
jne 0x4b3c67
movzx ecx, byte [ebp - 0x258]
movzx eax, ah
push eax
movzx eax, byte [ebp - 0x257]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x259]
push ecx
push eax
movzx eax, byte [ebp - 0x25a]
push eax
movzx eax, byte [ebp - 0x25b]
push eax
movzx eax, byte [ebp - 0x25c]
push eax
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
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
cmp al, 3
jne 0x4b3cad
movzx ecx, byte [ebp - 0x258]
movzx eax, ah
push eax
movzx eax, byte [ebp - 0x257]
shl ecx, 8
or ecx, eax
push ecx
push dword [ebp - 0x284]
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push esi
call fcn.00494100
add esp, 0x14
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
cmp al, 4
jne 0x4b3d4f
movzx edx, byte [ebp - 0x258]
movzx ecx, byte [ebp - 0x257]
movzx eax, ah
push eax
mov eax, edx
shl eax, 8
or eax, ecx
push eax
movzx eax, byte [ebp - 0x24d]
push eax
movzx eax, byte [ebp - 0x24e]
push eax
movzx eax, byte [ebp - 0x24f]
push eax
movzx eax, byte [ebp - 0x250]
push eax
movzx eax, byte [ebp - 0x251]
push eax
movzx eax, byte [ebp - 0x252]
push eax
movzx eax, byte [ebp - 0x253]
push eax
movzx eax, byte [ebp - 0x254]
push eax
movzx eax, byte [ebp - 0x255]
push eax
movzx eax, byte [ebp - 0x256]
push eax
movzx eax, byte [ebp - 0x259]
push ecx
push edx
push eax
movzx eax, byte [ebp - 0x25a]
push eax
movzx eax, byte [ebp - 0x25b]
push eax
movzx eax, byte [ebp - 0x25c]
push eax
push str.Cant_complete_SOCKS5_connection_to__02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_d.___d_
push esi
call fcn.00494100
add esp, 0x50
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
cmp al, 3
jne 0x4b3d75
movzx edi, byte [ebp - 0x25c]
add edi, 7
jmp 0x4b3d7f
cmp al, 4
mov ecx, 0x16
cmove edi, ecx
cmp dword [ebx + 0x5a8], 0
jne 0x4b3dc3
cmp edi, 0xa
jbe 0x4b3dc3
mov edx, dword [ebp - 0x270]
lea eax, [ebp - 0x268]
push eax
sub edi, 0xa
lea eax, [ebp - 0x256]
push edi
push eax
mov ecx, ebx
call fcn.004b2ba0
add esp, 0xc
test eax, eax
jne 0x4b3b76
cmp edi, dword [ebp - 0x268]
jne 0x4b3b76
lea eax, [ebp - 0x278]
mov dword [ebp - 0x278], 1
push eax
push 0x8004667e
push dword [ebp - 0x270]
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
push str.Failed_to_send_SOCKS5_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
push dword [ebp - 0x284]
push str.Failed_to_resolve___s__for_SOCKS5_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
push str.Unable_to_receive_initial_SOCKS5_response.
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.Unable_to_send_initial_SOCKS5_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
push str.Connection_time_out
push esi
call fcn.00494100
mov eax, 0x1c
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00528802
mov esp, ebp
pop ebp
ret