Function at 0x420740
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x2d0
mov eax, dword [0x4594d4]
xor eax, esp
mov dword [esp + 0x2cc], eax
mov eax, dword [esp + 0x2d4]
push ebx
push ebp
mov ebx, edx
mov ebp, dword [ebx + 0xc8]
push esi
mov esi, dword [ebx]
cmp dword [esi + 0x22c], 5
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x2e4]
mov dword [esp + 0x2c], ecx
sete cl
push edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], esi
mov byte [esp + 0x1b], cl
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x420791
sub eax, edi
mov dword [esp + 0x1c], eax
test cl, cl
jne 0x4207be
cmp eax, 0xff
jbe 0x4207be
push eax
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
mov ecx, esi
call fcn.00418f30
add esp, 8
mov byte [esp + 0x1b], 1
xor eax, eax
mov ecx, ebx
call fcn.00418050
mov esi, eax
mov dword [esp + 0x2c], esi
test esi, esi
jge 0x4207e9
mov eax, dword [esp + 0x14]
push str.Connection_time_out
call fcn.00418ff0
mov eax, 0x1c
jmp 0x420d3c
mov edi, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea edx, [esp + 0x20]
push edx
push 0x8004667e
push ebp
mov dword [esp + 0x2c], 1
call edi
push ebp
push 0xffffffffffffffff
mov eax, esi
call fcn.00421a00
add esp, 8
cmp eax, 0xffffffff
jne 0x420822
mov eax, dword [ebx]
push str.SOCKS5:_no_connection_here
jmp 0x420d32
test eax, eax
jne 0x42083c
mov eax, dword [ebx]
push str.SOCKS5:_connection_timeout
call fcn.00418ff0
mov eax, 0x1c
jmp 0x420d3c
test al, 4
je 0x42084c
mov eax, dword [ebx]
push str.SOCKS5:_error_occured_during_connection
jmp 0x420d32
cmp dword [esp + 0x38], 0
lea ecx, [esp + 0x20]
push ecx
setne al
push 0x8004667e
inc al
push ebp
mov byte [esp + 0x4c], 5
mov byte [esp + 0x4d], al
mov byte [esp + 0x4e], 0
mov byte [esp + 0x4f], 2
mov dword [esp + 0x2c], 0
call edi
lea edx, [esp + 0x28]
push edx
movzx edx, byte [esp + 0x45]
lea eax, [esp + 0x44]
add edx, 2
push eax
mov ecx, ebp
call fcn.00419160
add esp, 8
test eax, eax
jne 0x420d29
movzx ecx, byte [esp + 0x41]
add ecx, 2
cmp dword [esp + 0x28], ecx
jne 0x420d29
mov eax, 1
mov edx, ebp
call fcn.00427ff0
push 0xffffffffffffffff
push ebp
mov eax, esi
call fcn.00421a00
add esp, 8
cmp eax, 0xffffffff
jne 0x4208de
mov eax, dword [ebx]
push str.SOCKS5_nothing_to_read
jmp 0x420d32
test eax, eax
jne 0x4208f8
mov eax, dword [ebx]
push str.SOCKS5_read_timeout
call fcn.00418ff0
mov eax, 0x1c
jmp 0x420d3c
test al, 4
je 0x420912
mov eax, dword [ebx]
push str.SOCKS5_read_error_occured
call fcn.00418ff0
mov eax, 0x38
jmp 0x420d3c
xor eax, eax
mov edx, ebp
call fcn.00427ff0
push esi
lea edx, [esp + 0x28]
push edx
push 2
lea eax, [esp + 0x4c]
push eax
push ebp
mov edi, ebx
call fcn.004201b0
add esp, 0x14
test eax, eax
jne 0x420d22
cmp dword [esp + 0x24], 2
jne 0x420d22
cmp byte [esp + 0x40], 5
je 0x420957
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x420d2e
mov al, byte [esp + 0x41]
test al, al
je 0x420a70
cmp al, 2
jne 0x420cf1
mov edi, dword [esp + 0x38]
xor eax, eax
cmp edi, eax
je 0x4209a1
mov ecx, dword [esp + 0x30]
cmp ecx, eax
je 0x4209a1
mov eax, edi
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x420982
sub eax, esi
mov dword [esp + 0x20], eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x420992
sub ecx, esi
mov dword [esp + 0x38], ecx
jmp 0x4209a9
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], eax
push eax
lea ecx, [esp + 0x46]
push edi
push ecx
mov byte [esp + 0x4c], 1
mov byte [esp + 0x4d], al
call fcn.004315f0
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
add esp, 0xc
add esi, 2
mov byte [esp + esi + 0x40], al
push eax
inc esi
push edx
lea eax, [esp + esi + 0x48]
push eax
call fcn.004315f0
add esi, dword [esp + 0x44]
add esp, 0xc
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x44]
push edx
mov edx, esi
mov ecx, ebp
call fcn.00419160
add esp, 8
test eax, eax
jne 0x420cea
cmp esi, dword [esp + 0x28]
jne 0x420cea
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x28]
push ecx
push 2
lea edx, [esp + 0x4c]
push edx
push ebp
mov edi, ebx
call fcn.004201b0
add esp, 0x14
test eax, eax
jne 0x420ce3
cmp dword [esp + 0x24], 2
jne 0x420ce3
mov al, byte [esp + 0x41]
test al, al
je 0x420a6c
movzx ecx, byte [esp + 0x40]
movzx eax, al
push eax
mov eax, dword [esp + 0x18]
push ecx
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
call fcn.00418ff0
add esp, 0xc
mov eax, 7
jmp 0x420d3f
mov esi, dword [esp + 0x2c]
cmp byte [esp + 0x1b], 0
mov edx, dword [esp + 0x34]
mov byte [esp + 0x40], 5
mov byte [esp + 0x41], 1
mov byte [esp + 0x42], 0
jne 0x420ac5
mov eax, dword [esp + 0x1c]
push eax
lea edi, [eax + 7]
mov byte [esp + 0x48], al
push edx
lea eax, [esp + 0x4d]
push eax
mov byte [esp + 0x4f], 3
call fcn.004315f0
mov ecx, dword [esp + 0x2f8]
add esp, 0xc
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0x1c]
mov word [esp + edx + 0x45], ax
jmp 0x420bcd
mov ecx, dword [esp + 0x2ec]
lea eax, [esp + 0x1c]
push eax
push ecx
push edx
push ebx
call fcn.00418c90
add esp, 0x10
mov dword [esp + 0x30], 0xa
mov byte [esp + 0x43], 1
cmp eax, 0xffffffff
je 0x420ba8
cmp eax, 1
jne 0x420b06
lea eax, [esp + 0x1c]
push eax
mov esi, ebx
call fcn.00427bd0
add esp, 4
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x420b92
mov ecx, dword [edi]
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x420b92
push 0x40
lea esi, [esp + 0x29c]
call fcn.00418ac0
add esp, 4
lea ecx, [esp + 0x3e]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x42]
push eax
lea ecx, [esp + 0x44]
push ecx
mov edx, esi
push str._hu._hu._hu._hu
push edx
call fcn.0042dd7b
add esp, 0x18
cmp eax, 4
jne 0x420b7a
movzx eax, byte [esp + 0x38]
mov cl, byte [esp + 0x3a]
mov dl, byte [esp + 0x3c]
mov byte [esp + 0x44], al
movzx eax, byte [esp + 0x3e]
mov byte [esp + 0x45], cl
mov byte [esp + 0x46], dl
mov byte [esp + 0x47], al
jmp 0x420b82
mov dword [esp + 0x1c], 0
mov esi, dword [esp + 0x14]
call fcn.00418e50
cmp dword [esp + 0x1c], 0
jne 0x420bb2
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
push ecx
push str.Failed_to_resolve___s__for_SOCKS5_connect.
call fcn.00418ff0
add esp, 8
mov eax, 6
jmp 0x420d3f
mov edx, dword [esp + 0x2ec]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
mov word [esp + 0x48], ax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x44]
push ecx
mov edx, edi
mov ecx, ebp
call fcn.00419160
add esp, 8
test eax, eax
jne 0x420cdc
cmp dword [esp + 0x28], edi
jne 0x420cdc
push esi
lea edx, [esp + 0x28]
push edx
push 0xa
lea eax, [esp + 0x4c]
push eax
push ebp
mov edi, ebx
call fcn.004201b0
add esp, 0x14
test eax, eax
jne 0x420cba
cmp dword [esp + 0x24], 0xa
jne 0x420cba
cmp byte [esp + 0x40], 5
je 0x420c31
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x420d2e
mov al, byte [esp + 0x41]
test al, al
je 0x420c7f
mov edx, dword [esp + 0x48]
movzx ecx, al
push ecx
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, byte [esp + 0x4b]
movzx edx, byte [esp + 0x4a]
movzx eax, ax
push eax
movzx eax, byte [esp + 0x4d]
push ecx
movzx ecx, byte [esp + 0x50]
push edx
push eax
mov eax, dword [esp + 0x28]
push ecx
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
call fcn.00418ff0
add esp, 0x1c
mov eax, 7
jmp 0x420d3f
mov al, byte [esp + 0x43]
cmp al, 3
jne 0x420cc1
movzx esi, byte [esp + 0x44]
add esi, 7
cmp esi, 0xa
jle 0x420ccc
mov edx, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x28]
push eax
sub esi, 0xa
push esi
lea ecx, [esp + 0x56]
push ecx
push ebp
call fcn.004201b0
add esp, 0x14
test eax, eax
jne 0x420cba
cmp dword [esp + 0x24], esi
je 0x420ccc
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x420d2e
cmp al, 4
jne 0x420ccc
mov esi, 0x16
jmp 0x420c94
mov eax, 1
mov edx, ebp
call fcn.00427ff0
xor eax, eax
jmp 0x420d3f
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x420d2e
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x420d2e
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x420d2e
cmp al, 1
jne 0x420cfc
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x420d2e
cmp al, 0xff
jne 0x420d1b
mov eax, dword [esp + 0x38]
test eax, eax
je 0x420d14
cmp byte [eax], 0
je 0x420d14
push str.No_authentication_method_was_acceptable.
jmp 0x420d2e
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._
jmp 0x420d2e
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x420d2e
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x420d2e
push str.Unable_to_send_initial_SOCKS5_request.
mov eax, dword [esp + 0x18]
call fcn.00418ff0
mov eax, 7
add esp, 4
mov ecx, dword [esp + 0x2dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042bbc1
add esp, 0x2d0
ret