Function at 0x41c8c0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x2d0
mov eax, dword [0x4504f4]
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 0x41c911
sub eax, edi
mov dword [esp + 0x1c], eax
test cl, cl
jne 0x41c93e
cmp eax, 0xff
jbe 0x41c93e
push eax
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
mov ecx, esi
call fcn.00415780
add esp, 8
mov byte [esp + 0x1b], 1
xor eax, eax
mov ecx, ebx
call fcn.00414900
mov esi, eax
mov dword [esp + 0x2c], esi
test esi, esi
jge 0x41c969
mov eax, dword [esp + 0x14]
push str.Connection_time_out
call fcn.00415840
mov eax, 0x1c
jmp 0x41cebc
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.0041db20
add esp, 8
cmp eax, 0xffffffff
jne 0x41c9a2
mov eax, dword [ebx]
push str.SOCKS5:_no_connection_here
jmp 0x41ceb2
test eax, eax
jne 0x41c9bc
mov eax, dword [ebx]
push str.SOCKS5:_connection_timeout
call fcn.00415840
mov eax, 0x1c
jmp 0x41cebc
test al, 4
je 0x41c9cc
mov eax, dword [ebx]
push str.SOCKS5:_error_occured_during_connection
jmp 0x41ceb2
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.004159b0
add esp, 8
test eax, eax
jne 0x41cea9
movzx ecx, byte [esp + 0x41]
add ecx, 2
cmp dword [esp + 0x28], ecx
jne 0x41cea9
mov eax, 1
mov edx, ebp
call fcn.00424170
push 0xffffffffffffffff
push ebp
mov eax, esi
call fcn.0041db20
add esp, 8
cmp eax, 0xffffffff
jne 0x41ca5e
mov eax, dword [ebx]
push str.SOCKS5_nothing_to_read
jmp 0x41ceb2
test eax, eax
jne 0x41ca78
mov eax, dword [ebx]
push str.SOCKS5_read_timeout
call fcn.00415840
mov eax, 0x1c
jmp 0x41cebc
test al, 4
je 0x41ca92
mov eax, dword [ebx]
push str.SOCKS5_read_error_occured
call fcn.00415840
mov eax, 0x38
jmp 0x41cebc
xor eax, eax
mov edx, ebp
call fcn.00424170
push esi
lea edx, [esp + 0x28]
push edx
push 2
lea eax, [esp + 0x4c]
push eax
push ebp
mov edi, ebx
call fcn.0041c330
add esp, 0x14
test eax, eax
jne 0x41cea2
cmp dword [esp + 0x24], 2
jne 0x41cea2
cmp byte [esp + 0x40], 5
je 0x41cad7
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x41ceae
mov al, byte [esp + 0x41]
test al, al
je 0x41cbf0
cmp al, 2
jne 0x41ce71
mov edi, dword [esp + 0x38]
xor eax, eax
cmp edi, eax
je 0x41cb21
mov ecx, dword [esp + 0x30]
cmp ecx, eax
je 0x41cb21
mov eax, edi
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x41cb02
sub eax, esi
mov dword [esp + 0x20], eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x41cb12
sub ecx, esi
mov dword [esp + 0x38], ecx
jmp 0x41cb29
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.0042d530
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.0042d530
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.004159b0
add esp, 8
test eax, eax
jne 0x41ce6a
cmp esi, dword [esp + 0x28]
jne 0x41ce6a
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.0041c330
add esp, 0x14
test eax, eax
jne 0x41ce63
cmp dword [esp + 0x24], 2
jne 0x41ce63
mov al, byte [esp + 0x41]
test al, al
je 0x41cbec
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.00415840
add esp, 0xc
mov eax, 7
jmp 0x41cebf
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 0x41cc45
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.0042d530
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 0x41cd4d
mov ecx, dword [esp + 0x2ec]
lea eax, [esp + 0x1c]
push eax
push ecx
push edx
push ebx
call fcn.004154e0
add esp, 0x10
mov dword [esp + 0x30], 0xa
mov byte [esp + 0x43], 1
cmp eax, 0xffffffff
je 0x41cd28
cmp eax, 1
jne 0x41cc86
lea eax, [esp + 0x1c]
push eax
mov esi, ebx
call fcn.00423d50
add esp, 4
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x41cd12
mov ecx, dword [edi]
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x41cd12
push 0x40
lea esi, [esp + 0x29c]
call fcn.00415310
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.0042980f
add esp, 0x18
cmp eax, 4
jne 0x41ccfa
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 0x41cd02
mov dword [esp + 0x1c], 0
mov esi, dword [esp + 0x14]
call fcn.004156a0
cmp dword [esp + 0x1c], 0
jne 0x41cd32
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
push ecx
push str.Failed_to_resolve___s__for_SOCKS5_connect.
call fcn.00415840
add esp, 8
mov eax, 6
jmp 0x41cebf
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.004159b0
add esp, 8
test eax, eax
jne 0x41ce5c
cmp dword [esp + 0x28], edi
jne 0x41ce5c
push esi
lea edx, [esp + 0x28]
push edx
push 0xa
lea eax, [esp + 0x4c]
push eax
push ebp
mov edi, ebx
call fcn.0041c330
add esp, 0x14
test eax, eax
jne 0x41ce3a
cmp dword [esp + 0x24], 0xa
jne 0x41ce3a
cmp byte [esp + 0x40], 5
je 0x41cdb1
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x41ceae
mov al, byte [esp + 0x41]
test al, al
je 0x41cdff
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.00415840
add esp, 0x1c
mov eax, 7
jmp 0x41cebf
mov al, byte [esp + 0x43]
cmp al, 3
jne 0x41ce41
movzx esi, byte [esp + 0x44]
add esi, 7
cmp esi, 0xa
jle 0x41ce4c
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.0041c330
add esp, 0x14
test eax, eax
jne 0x41ce3a
cmp dword [esp + 0x24], esi
je 0x41ce4c
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x41ceae
cmp al, 4
jne 0x41ce4c
mov esi, 0x16
jmp 0x41ce14
mov eax, 1
mov edx, ebp
call fcn.00424170
xor eax, eax
jmp 0x41cebf
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x41ceae
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x41ceae
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x41ceae
cmp al, 1
jne 0x41ce7c
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x41ceae
cmp al, 0xff
jne 0x41ce9b
mov eax, dword [esp + 0x38]
test eax, eax
je 0x41ce94
cmp byte [eax], 0
je 0x41ce94
push str.No_authentication_method_was_acceptable.
jmp 0x41ceae
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 0x41ceae
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x41ceae
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x41ceae
push str.Unable_to_send_initial_SOCKS5_request.
mov eax, dword [esp + 0x18]
call fcn.00415840
mov eax, 7
add esp, 4
mov ecx, dword [esp + 0x2dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00427d7d
add esp, 0x2d0
ret