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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x278], ecx
mov ecx, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0x28c], edx
mov edx, dword [ebp + 8]
mov eax, dword [ecx + eax*4 + 0x154]
cmp dword [ecx + 0x138], 5
mov ebx, dword [ecx]
mov dword [ebp - 0x284], ecx
mov ecx, edx
mov dword [ebp - 0x27c], eax
sete ah
push esi
mov dword [ebp - 0x288], edx
push edi
mov byte [ebp - 0x26d], ah
lea edx, [ecx + 1]
jmp 0x452280
mov al, byte [ecx]
inc ecx
test al, al
jne 0x452280
sub ecx, edx
mov dword [ebp - 0x268], ecx
test ah, ah
jne 0x4522b1
cmp ecx, 0xff
jbe 0x4522b1
push ecx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push ebx
call fcn.00443730
add esp, 0xc
mov byte [ebp - 0x26d], 1
mov edx, dword [ebx + 0x1c8]
xor eax, eax
mov ecx, 0x493e0
test edx, edx
mov dword [ebp - 0x26c], ecx
mov ecx, 1
cmovg eax, ecx
mov ecx, dword [ebx + 0x1cc]
test ecx, ecx
jle 0x4522db
or eax, 2
dec eax
je 0x4522fb
dec eax
je 0x4522f3
dec eax
jne 0x452301
cmp edx, ecx
mov eax, ecx
cmovl eax, edx
mov dword [ebp - 0x26c], eax
jmp 0x452301
mov dword [ebp - 0x26c], ecx
jmp 0x452301
mov dword [ebp - 0x26c], edx
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
mov eax, 0x10624dd3
mov edi, edx
shr edi, 6
imul ecx, edi, 0x3e8
sub esi, ecx
imul ecx, esi, 0x3e8
mov esi, dword [ebx + 0x4a8]
sub esi, edi
mov edi, dword [ebp - 0x26c]
sub ecx, dword [ebx + 0x4ac]
imul ecx
imul eax, esi, 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
add edi, eax
mov dword [ebp - 0x26c], edi
je 0x452cbf
test edi, edi
js 0x452cbf
mov esi, dword [ebp - 0x27c]
lea eax, [ebp - 0x264]
push eax
push 0x8004667e
push esi
mov dword [ebp - 0x264], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push edi
push esi
or edx, 0xffffffff
or ecx, 0xffffffff
call fcn.00442f70
add esp, 8
cmp eax, 0xffffffff
jne 0x4523c9
mov eax, dword [ebp - 0x284]
push str.SOCKS5:_no_connection_here
push dword [eax]
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x4523df
mov eax, dword [ebp - 0x284]
push str.SOCKS5:_connection_timeout
push dword [eax]
jmp 0x452cc5
test al, 4
je 0x45240e
mov eax, dword [ebp - 0x284]
push str.SOCKS5:_error_occurred_during_connection
push dword [eax]
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x278], 0
mov byte [ebp - 0x260], 5
setne al
mov word [ebp - 0x25e], 0x200
inc al
mov dword [ebp - 0x264], 0
mov byte [ebp - 0x25f], al
lea eax, [ebp - 0x264]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, dword [ebp - 0x284]
lea eax, [ebp - 0x280]
push eax
movzx eax, byte [ebp - 0x25f]
mov edx, esi
add eax, 2
mov ecx, edi
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.00443c30
add esp, 0xc
test eax, eax
jne 0x452c9b
movzx eax, byte [ebp - 0x25f]
add eax, 2
cmp dword [ebp - 0x280], eax
jne 0x452c9b
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [ebp - 0x26c]
or edx, 0xffffffff
push ecx
push 0xffffffffffffffff
mov ecx, esi
call fcn.00442f70
add esp, 8
cmp eax, 0xffffffff
jne 0x4524f3
push str.SOCKS5_nothing_to_read
push dword [edi]
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x452503
push str.SOCKS5_read_timeout
push dword [edi]
jmp 0x452cc5
test al, 4
je 0x45252c
push str.SOCKS5_read_error_occurred
push dword [edi]
call fcn.004437f0
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 0
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x26c]
mov edx, esi
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.00451a20
add esp, 0xc
test eax, eax
jne 0x452c77
cmp dword [ebp - 0x26c], 2
jne 0x452c77
cmp byte [ebp - 0x260], 5
je 0x4525a7
push str.Received_invalid_version_in_initial_SOCKS5_response.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25f]
test al, al
je 0x45282b
cmp al, 2
jne 0x452784
mov eax, dword [ebp - 0x278]
test eax, eax
je 0x45261b
mov edx, dword [ebp - 0x28c]
test edx, edx
je 0x45261b
mov ecx, eax
lea eax, [ecx + 1]
mov dword [ebp - 0x264], eax
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4525e0
sub ecx, dword [ebp - 0x264]
lea eax, [edx + 1]
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x274], eax
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x452600
sub edx, dword [ebp - 0x274]
mov eax, dword [ebp - 0x278]
mov dword [ebp - 0x274], edx
jmp 0x452629
xor ecx, ecx
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x274], ecx
mov byte [ebp - 0x260], 1
mov byte [ebp - 0x25f], cl
test eax, eax
je 0x452655
test ecx, ecx
je 0x452655
push ecx
push eax
lea eax, [ebp - 0x25e]
push eax
call sub.MSVCR120.dll_memcpy
mov ecx, dword [ebp - 0x264]
add esp, 0xc
mov eax, dword [ebp - 0x274]
mov edx, dword [ebp - 0x28c]
mov byte [ebp + ecx - 0x25e], al
add ecx, 3
mov dword [ebp - 0x278], ecx
test edx, edx
je 0x452698
test eax, eax
je 0x452698
push eax
lea eax, [ebp - 0x260]
push edx
add eax, ecx
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp - 0x274]
add esp, 0xc
mov ecx, dword [ebp - 0x278]
add ecx, eax
mov edx, esi
lea eax, [ebp - 0x280]
mov dword [ebp - 0x278], ecx
push eax
push ecx
lea eax, [ebp - 0x260]
mov ecx, edi
push eax
call fcn.00443c30
add esp, 0xc
test eax, eax
jne 0x452760
mov eax, dword [ebp - 0x278]
cmp eax, dword [ebp - 0x280]
jne 0x452760
lea eax, [ebp - 0x26c]
mov edx, esi
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.00451a20
add esp, 0xc
test eax, eax
jne 0x45273c
cmp dword [ebp - 0x26c], 2
jne 0x45273c
mov al, byte [ebp - 0x25f]
test al, al
je 0x45282b
movzx eax, al
push eax
movzx eax, byte [ebp - 0x260]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push ebx
call fcn.004437f0
add esp, 0x10
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
cmp al, 1
jne 0x4527ac
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
cmp al, 0xff
jne 0x452807
mov eax, dword [ebp - 0x278]
test eax, eax
je 0x4527e3
cmp byte [eax], 0
je 0x4527e3
push str.No_authentication_method_was_acceptable.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push 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 ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 0x26d], 0
mov esi, 3
mov word [ebp - 0x260], 0x105
mov byte [ebp - 0x25e], 0
jne 0x452880
mov eax, dword [ebp - 0x268]
push eax
push dword [ebp - 0x288]
mov byte [ebp - 0x25c], al
lea eax, [ebp - 0x25b]
push eax
mov byte [ebp - 0x25d], 3
call sub.MSVCR120.dll_memcpy
mov esi, dword [ebp - 0x268]
add esp, 0xc
add esi, 5
jmp 0x45295d
mov edx, dword [ebp - 0x288]
lea eax, [ebp - 0x274]
push eax
push dword [ebp + 0xc]
mov ecx, edi
call fcn.00442280
add esp, 8
cmp eax, 0xffffffff
je 0x452c61
cmp eax, 1
jne 0x4528bd
lea edx, [ebp - 0x274]
mov ecx, edi
call fcn.00442bd0
test eax, eax
jne 0x452cd2
mov eax, dword [ebp - 0x274]
test eax, eax
je 0x452c4d
mov eax, dword [eax]
mov dword [ebp - 0x268], eax
test eax, eax
je 0x452c4d
cmp dword [eax + 4], 2
jne 0x452939
mov byte [ebp - 0x25d], 1
lea ecx, [ebp - 0x25c]
mov edi, dword [eax + 0x18]
mov esi, 4
sub edi, ecx
lea ecx, [ebp - 0x25d]
add edi, esi
lea eax, [edi + esi]
mov al, byte [ebp + eax - 0x260]
mov byte [ebp + esi - 0x260], al
inc esi
movzx eax, byte [ecx + esi - 4]
push eax
push 0x4f2c14
push ebx
call fcn.00443730
add esp, 0xc
lea ecx, [ebp - 0x25d]
cmp esi, 8
jl 0x452900
mov edi, dword [ebp - 0x284]
jmp 0x452943
mov dword [ebp - 0x268], 0
mov edx, dword [ebp - 0x274]
mov ecx, ebx
call fcn.00442400
cmp dword [ebp - 0x268], 0
je 0x452c4d
mov ecx, dword [ebp + 0xc]
mov eax, ecx
mov edx, dword [ebp - 0x27c]
sar eax, 8
mov byte [ebp + esi - 0x260], al
lea eax, [ebp - 0x280]
mov byte [ebp + esi - 0x25f], cl
add esi, 2
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push esi
push eax
call fcn.00443c30
add esp, 0xc
test eax, eax
jne 0x452c29
cmp esi, dword [ebp - 0x280]
jne 0x452c29
mov edx, dword [ebp - 0x27c]
lea eax, [ebp - 0x26c]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 0xa
push eax
call fcn.00451a20
add esp, 0xc
test eax, eax
jne 0x452c05
cmp dword [ebp - 0x26c], 0xa
jne 0x452c05
cmp byte [ebp - 0x260], 5
je 0x452a0b
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25f]
test al, al
je 0x452b80
mov cl, byte [ebp - 0x25d]
cmp cl, 1
jne 0x452a80
movzx ecx, byte [ebp - 0x258]
movzx eax, al
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 ebx
call fcn.004437f0
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
cmp cl, 3
jne 0x452ac7
movzx ecx, byte [ebp - 0x258]
movzx eax, al
push eax
movzx eax, byte [ebp - 0x257]
shl ecx, 8
or ecx, eax
push ecx
push dword [ebp - 0x288]
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push ebx
call fcn.004437f0
add esp, 0x14
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
cmp cl, 4
jne 0x452b6a
movzx edx, byte [ebp - 0x258]
movzx ecx, byte [ebp - 0x257]
movzx eax, al
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 ebx
call fcn.004437f0
add esp, 0x50
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25d]
cmp al, 3
jne 0x452bce
movzx esi, byte [ebp - 0x25c]
add esi, 7
cmp esi, 0xa
jg 0x452bd7
lea eax, [ebp - 0x268]
mov dword [ebp - 0x268], 1
push eax
push 0x8004667e
push dword [ebp - 0x27c]
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.0046bea8
mov esp, ebp
pop ebp
ret
cmp al, 4
jne 0x452b99
mov esi, 0x16
mov edx, dword [ebp - 0x27c]
lea eax, [ebp - 0x26c]
push eax
sub esi, 0xa
lea eax, [ebp - 0x256]
push esi
push eax
mov ecx, edi
call fcn.00451a20
add esp, 0xc
test eax, eax
jne 0x452c05
cmp esi, dword [ebp - 0x26c]
je 0x452b99
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_connect_request.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x288]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push ebx
call fcn.004437f0
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_initial_SOCKS5_response.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push str.Unable_to_send_initial_SOCKS5_request.
push ebx
call fcn.004437f0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push str.Connection_time_out
push ebx
call fcn.004437f0
mov eax, 0x1c
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046bea8
mov esp, ebp
pop ebp
ret