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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x4d6750]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x270], ecx
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [eax]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x278], ecx
mov ecx, dword [eax + ecx*4 + 0x150]
mov dword [ebp - 0x28c], edx
xor edx, edx
cmp dword [eax + 0x134], 5
mov dword [ebp - 0x274], ecx
mov ecx, esi
sete dl
mov dword [ebp - 0x284], esi
push edi
mov dword [ebp - 0x280], eax
mov dword [ebp - 0x288], edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x436b93
sub ecx, esi
mov dword [ebp - 0x27c], ecx
test edx, edx
jne 0x436bc7
cmp ecx, 0xff
jbe 0x436bc7
push ecx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push ebx
call fcn.00428020
add esp, 0xc
mov dword [ebp - 0x288], 1
mov esi, dword [ebx + 0x218]
xor eax, eax
mov edx, dword [ebx + 0x21c]
mov ecx, 0x493e0
test esi, esi
mov dword [ebp - 0x26c], ecx
mov ecx, 1
cmovg eax, ecx
test edx, edx
jle 0x436bf1
or eax, 2
dec eax
je 0x436c11
dec eax
je 0x436c09
dec eax
jne 0x436c17
cmp esi, edx
mov ecx, edx
cmovl ecx, esi
mov dword [ebp - 0x26c], ecx
jmp 0x436c17
mov dword [ebp - 0x26c], edx
jmp 0x436c17
mov dword [ebp - 0x26c], esi
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 + 0x558]
sub esi, edi
sub ecx, dword [ebx + 0x55c]
imul ecx
imul eax, esi, 0x3e8
mov esi, dword [ebp - 0x26c]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
add esi, eax
je 0x437637
test esi, esi
js 0x437637
mov edi, dword [ebp - 0x274]
lea eax, [ebp - 0x264]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x264], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push esi
push edi
or edx, 0xffffffff
or ecx, 0xffffffff
call fcn.00427890
add esp, 8
cmp eax, 0xffffffff
jne 0x436cd9
mov eax, dword [ebp - 0x280]
push str.SOCKS5:_no_connection_here
push dword [eax]
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x436cef
mov eax, dword [ebp - 0x280]
push str.SOCKS5:_connection_timeout
push dword [eax]
jmp 0x43763d
test al, 4
je 0x436d1e
mov eax, dword [ebp - 0x280]
push str.SOCKS5:_error_occurred_during_connection
push dword [eax]
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x270], 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 edi
mov dword [ebp - 0x264], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x26c]
mov edx, edi
mov edi, dword [ebp - 0x280]
mov ecx, edi
push eax
movzx eax, byte [ebp - 0x25f]
add eax, 2
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.004284a0
add esp, 0xc
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x437613
movzx ecx, byte [ebp - 0x25f]
add ecx, 2
cmp dword [ebp - 0x26c], ecx
jne 0x437613
lea eax, [ebp - 0x268]
mov dword [ebp - 0x268], 1
push eax
push 0x8004667e
push dword [ebp - 0x274]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push esi
mov esi, dword [ebp - 0x274]
or edx, 0xffffffff
push 0xffffffffffffffff
mov ecx, esi
call fcn.00427890
add esp, 8
cmp eax, 0xffffffff
jne 0x436e15
push str.SOCKS5_nothing_to_read
push dword [edi]
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x436e25
push str.SOCKS5_read_timeout
push dword [edi]
jmp 0x43763d
test al, 4
je 0x436e4e
push str.SOCKS5_read_error_occurred
push dword [edi]
call fcn.004280e0
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x268]
mov dword [ebp - 0x268], 0
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x268]
mov edx, esi
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.00436340
add esp, 0xc
test eax, eax
jne 0x4375ef
cmp dword [ebp - 0x268], 2
jne 0x4375ef
cmp byte [ebp - 0x260], 5
je 0x436ec9
push str.Received_invalid_version_in_initial_SOCKS5_response.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25f]
test al, al
je 0x437154
cmp al, 1
jne 0x436f1a
mov ecx, dword [ebp - 0x278]
mov edx, edi
call fcn.0044d380
mov dword [ebp - 0x264], eax
test eax, eax
je 0x437154
push str.Unable_to_negotiate_SOCKS5_gssapi_context.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
cmp al, 2
jne 0x4370d5
mov esi, dword [ebp - 0x270]
test esi, esi
je 0x436f75
mov edx, dword [ebp - 0x28c]
test edx, edx
je 0x436f75
mov ecx, esi
lea eax, [ecx + 1]
mov dword [ebp - 0x278], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x436f41
sub ecx, dword [ebp - 0x278]
lea eax, [edx + 1]
mov dword [ebp - 0x270], ecx
mov dword [ebp - 0x278], eax
lea ecx, [ecx]
mov al, byte [edx]
inc edx
test al, al
jne 0x436f60
sub edx, dword [ebp - 0x278]
mov dword [ebp - 0x264], edx
jmp 0x436f83
xor ecx, ecx
mov dword [ebp - 0x270], ecx
mov dword [ebp - 0x264], ecx
mov byte [ebp - 0x260], 1
mov byte [ebp - 0x25f], cl
test esi, esi
je 0x436faf
test ecx, ecx
je 0x436faf
push ecx
lea eax, [ebp - 0x25e]
push esi
push eax
call fcn.0048d4b0
mov ecx, dword [ebp - 0x270]
add esp, 0xc
mov eax, dword [ebp - 0x264]
lea esi, [ecx + 2]
mov ecx, dword [ebp - 0x28c]
mov byte [ebp + esi - 0x260], al
inc esi
test ecx, ecx
je 0x436fe7
test eax, eax
je 0x436fe7
push eax
lea eax, [ebp - 0x260]
push ecx
add eax, esi
push eax
call fcn.0048d4b0
mov eax, dword [ebp - 0x264]
add esp, 0xc
mov edx, dword [ebp - 0x274]
add esi, eax
lea eax, [ebp - 0x26c]
mov ecx, edi
push eax
lea eax, [ebp - 0x260]
push esi
push eax
call fcn.004284a0
add esp, 0xc
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4370b1
cmp esi, dword [ebp - 0x26c]
jne 0x4370b1
mov edx, dword [ebp - 0x274]
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 2
push eax
call fcn.00436340
add esp, 0xc
test eax, eax
jne 0x43708d
cmp dword [ebp - 0x268], 2
jne 0x43708d
mov al, byte [ebp - 0x25f]
test al, al
je 0x437154
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.004280e0
add esp, 0x10
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
cmp al, 0xff
jne 0x437130
mov eax, dword [ebp - 0x270]
test eax, eax
je 0x43710c
cmp byte [eax], 0
je 0x43710c
push str.No_authentication_method_was_acceptable.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
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.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x288], 0
mov esi, 3
mov word [ebp - 0x260], 0x105
mov byte [ebp - 0x25e], 0
jne 0x4371a9
mov eax, dword [ebp - 0x27c]
push eax
push dword [ebp - 0x284]
mov byte [ebp - 0x25c], al
lea eax, [ebp - 0x25b]
push eax
mov byte [ebp - 0x25d], 3
call fcn.0048d4b0
mov esi, dword [ebp - 0x27c]
add esp, 0xc
add esi, 5
jmp 0x43728d
mov edx, dword [ebp - 0x284]
lea eax, [ebp - 0x270]
push eax
push dword [ebp + 0xc]
mov ecx, edi
call fcn.00426c50
add esp, 8
cmp eax, 0xffffffff
je 0x4375d9
cmp eax, 1
jne 0x4371ec
lea edx, [ebp - 0x270]
mov ecx, edi
call fcn.004274f0
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x43764a
mov eax, dword [ebp - 0x270]
test eax, eax
je 0x4375c5
mov eax, dword [eax]
mov dword [ebp - 0x27c], eax
test eax, eax
je 0x4375c5
cmp dword [eax + 4], 2
jne 0x437269
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
nop
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 0x4ba2ac
push ebx
call fcn.00428020
add esp, 0xc
lea ecx, [ebp - 0x25d]
cmp esi, 8
jl 0x437230
mov edi, dword [ebp - 0x280]
jmp 0x437273
mov dword [ebp - 0x27c], 0
mov edx, dword [ebp - 0x270]
mov ecx, ebx
call fcn.00426e50
cmp dword [ebp - 0x27c], 0
je 0x4375c5
mov ecx, dword [ebp + 0xc]
mov eax, ecx
sar eax, 8
mov byte [ebp + esi - 0x260], al
mov byte [ebp + esi - 0x25f], cl
add esi, 2
cmp dword [edi + 0x5a8], 0
je 0x4372c5
push str.SOCKS5_gssapi_protection_not_yet_implemented.
push ebx
call fcn.004280e0
mov eax, dword [ebp - 0x264]
add esp, 8
jmp 0x4372e4
mov edx, dword [ebp - 0x274]
lea eax, [ebp - 0x26c]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push esi
push eax
call fcn.004284a0
add esp, 0xc
test eax, eax
jne 0x4375a1
cmp esi, dword [ebp - 0x26c]
jne 0x4375a1
lea esi, [eax + 0xa]
cmp dword [edi + 0x5a8], eax
je 0x437316
push str.SOCKS5_gssapi_protection_not_yet_implemented.
push ebx
call fcn.004280e0
add esp, 8
jmp 0x437548
mov edx, dword [ebp - 0x274]
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x260]
mov ecx, edi
push 0xa
push eax
call fcn.00436340
add esp, 0xc
test eax, eax
jne 0x437548
cmp dword [ebp - 0x268], esi
jne 0x437548
cmp byte [ebp - 0x260], 5
je 0x437377
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25f]
test al, al
je 0x4374ec
mov cl, byte [ebp - 0x25d]
cmp cl, 1
jne 0x4373ec
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.004280e0
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
cmp cl, 3
jne 0x437433
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 - 0x284]
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push ebx
call fcn.004280e0
add esp, 0x14
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
cmp cl, 4
jne 0x4374d6
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.004280e0
add esp, 0x50
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 0x25d]
cmp al, 3
jne 0x437502
movzx esi, byte [ebp - 0x25c]
add esi, 7
jmp 0x43750c
cmp al, 4
mov ecx, 0x16
cmove esi, ecx
cmp dword [edi + 0x5a8], 0
jne 0x43756c
cmp esi, 0xa
jle 0x43756c
mov edx, dword [ebp - 0x274]
lea eax, [ebp - 0x268]
push eax
sub esi, 0xa
lea eax, [ebp - 0x256]
push esi
push eax
mov ecx, edi
call fcn.00436340
add esp, 0xc
test eax, eax
jne 0x437548
cmp esi, dword [ebp - 0x268]
je 0x43756c
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x278]
mov dword [ebp - 0x278], 1
push eax
push 0x8004667e
push dword [ebp - 0x274]
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.00488366
mov esp, ebp
pop ebp
ret
push str.Failed_to_send_SOCKS5_connect_request.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x284]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push ebx
call fcn.004280e0
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
push str.Unable_to_receive_initial_SOCKS5_response.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
push str.Unable_to_send_initial_SOCKS5_request.
push ebx
call fcn.004280e0
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488366
mov esp, ebp
pop ebp
ret
push str.Connection_time_out
push ebx
call fcn.004280e0
mov eax, 0x1c
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00488366
mov esp, ebp
pop ebp
ret