Function at 0x42dd50
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
sub esp, 0x2cc
mov eax, dword [0x46e074]
xor eax, esp
mov dword [esp + 0x2c4], eax
mov eax, dword [esp + 0x2d0]
push ebx
mov ebx, dword [esp + 0x2e0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2dc]
mov dword [esp + 0x28], ecx
mov ecx, dword [ebx + eax*4 + 0x1a0]
xor eax, eax
cmp dword [ebx + 0xd8], 5
push ebp
sete al
push esi
mov esi, dword [ebx]
push edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x10], esi
mov ebp, eax
mov eax, edx
mov dword [esp + 0x2c], ebp
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42ddb1
sub eax, edi
cmp dword [ebx + 0x280], 0
mov dword [esp + 0x1c], eax
je 0x42dddf
mov ecx, dword [esp + 0x2e4]
push ecx
push edx
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
mov ecx, esi
call fcn.004140b0
add esp, 0xc
test ebp, ebp
jne 0x42de09
cmp dword [esp + 0x1c], 0xff
jbe 0x42de09
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebx]
push edx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
call fcn.004140b0
add esp, 8
mov dword [esp + 0x2c], 1
mov eax, dword [esi + 0x1e0]
xor ecx, ecx
xor ebp, ebp
mov edi, 0x493e0
test eax, eax
jle 0x42de1f
lea ecx, [ebp + 1]
mov edx, dword [esi + 0x1e4]
test edx, edx
jle 0x42de2c
or ecx, 2
sub ecx, 1
je 0x42de41
sub ecx, 1
je 0x42de3f
sub ecx, 1
jne 0x42de46
cmp eax, edx
jl 0x42de41
mov eax, edx
cdq
mov ebp, edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov esi, edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 0x614]
shr esi, 6
mov eax, esi
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
mov eax, ecx
push 0xffffffffffffffff
sub eax, edx
cdq
push 0xfffffc18
push edx
push eax
call fcn.00449630
mov ecx, eax
mov eax, edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, esi
sub eax, dword [edx + 0x610]
imul eax, eax, 0x3e8
cdq
sub ecx, eax
mov eax, dword [esp + 0x14]
sbb eax, edx
add edi, ecx
adc ebp, eax
mov eax, edi
or eax, ebp
je 0x42debe
test ebp, ebp
jg 0x42ded6
jl 0x42debe
test edi, edi
jae 0x42ded6
mov eax, dword [esp + 0x10]
push str.Connection_time_out
call fcn.00414140
mov eax, 0x1c
jmp 0x42e59e
mov esi, dword [esp + 0x30]
lea ecx, [esp + 0x14]
push ecx
push 0x8004667e
push esi
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push ebp
push edi
push esi
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.00421190
add esp, 0x14
cmp eax, 0xffffffff
jne 0x42df13
mov eax, dword [ebx]
push str.SOCKS5:_no_connection_here
jmp 0x42e594
test eax, eax
jne 0x42df2d
mov eax, dword [ebx]
push str.SOCKS5:_connection_timeout
call fcn.00414140
mov eax, 0x1c
jmp 0x42e59e
test al, 4
je 0x42df3d
mov eax, dword [ebx]
push str.SOCKS5:_error_occurred_during_connection
jmp 0x42e594
cmp dword [esp + 0x18], 0
lea eax, [esp + 0x14]
push eax
setne dl
push 0x8004667e
inc dl
push esi
mov byte [esp + 0x44], 5
mov byte [esp + 0x45], dl
mov byte [esp + 0x46], 0
mov byte [esp + 0x47], 2
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esp + 0x2e4]
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push str.SOCKS5_communication_to__s:_d_n
call fcn.004140b0
movzx ecx, byte [esp + 0x45]
add esp, 0xc
lea eax, [esp + 0x24]
push eax
add ecx, 2
push ecx
lea edx, [esp + 0x40]
push edx
mov edx, esi
mov eax, ebx
call fcn.00414400
add esp, 0xc
test eax, eax
jne 0x42e58b
movzx eax, byte [esp + 0x39]
add eax, 2
cmp dword [esp + 0x24], eax
jne 0x42e58b
lea ecx, [esp + 0x14]
push ecx
push 0x8004667e
push esi
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push ebp
push edi
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
call fcn.00421190
add esp, 0x14
cmp eax, 0xffffffff
jne 0x42e003
mov eax, dword [ebx]
push str.SOCKS5_nothing_to_read
jmp 0x42e594
test eax, eax
jne 0x42e01d
mov eax, dword [ebx]
push str.SOCKS5_read_timeout
call fcn.00414140
mov eax, 0x1c
jmp 0x42e59e
test al, 4
je 0x42e037
mov eax, dword [ebx]
push str.SOCKS5_read_error_occurred
call fcn.00414140
mov eax, 0x38
jmp 0x42e59e
lea edx, [esp + 0x14]
push edx
push 0x8004667e
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [esp + 0x20]
push eax
push 2
lea ecx, [esp + 0x40]
push ecx
push esi
push ebx
call fcn.0042d620
add esp, 0x14
test eax, eax
jne 0x42e584
cmp dword [esp + 0x20], 2
jne 0x42e584
cmp byte [esp + 0x38], 5
je 0x42e08a
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x42e590
mov al, byte [esp + 0x39]
test al, al
je 0x42e1b8
cmp al, 2
jne 0x42e553
mov edi, dword [esp + 0x18]
test edi, edi
je 0x42e0d2
mov esi, dword [esp + 0x34]
test esi, esi
je 0x42e0d2
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42e0b3
sub eax, edx
mov ecx, eax
mov eax, esi
mov dword [esp + 0x18], ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x42e0c7
sub eax, esi
jmp 0x42e0da
xor ecx, ecx
mov dword [esp + 0x18], ecx
xor eax, eax
mov dword [esp + 0x14], eax
mov byte [esp + 0x38], 1
mov byte [esp + 0x39], cl
test edi, edi
je 0x42e10a
test ecx, ecx
je 0x42e10a
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x3e]
push edi
push eax
call fcn.00448250
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
add esp, 0xc
lea esi, [ecx + 2]
mov ecx, dword [esp + 0x34]
mov byte [esp + esi + 0x38], al
inc esi
test ecx, ecx
je 0x42e131
test eax, eax
je 0x42e131
mov edx, dword [esp + 0x14]
push edx
push ecx
lea eax, [esp + esi + 0x40]
push eax
call fcn.00448250
add esp, 0xc
add esi, dword [esp + 0x14]
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x3c]
push esi
push edx
mov edx, edi
mov eax, ebx
call fcn.00414400
add esp, 0xc
test eax, eax
jne 0x42e54c
cmp esi, dword [esp + 0x24]
jne 0x42e54c
lea eax, [esp + 0x20]
push eax
push 2
lea ecx, [esp + 0x40]
push ecx
push edi
push ebx
call fcn.0042d620
add esp, 0x14
test eax, eax
jne 0x42e545
cmp dword [esp + 0x20], 2
jne 0x42e545
mov al, byte [esp + 0x39]
test al, al
je 0x42e1b8
movzx edx, al
movzx eax, byte [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0x18]
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
call fcn.00414140
add esp, 0xc
mov eax, 7
jmp 0x42e5a1
cmp dword [esp + 0x2c], 0
mov byte [esp + 0x38], 5
mov byte [esp + 0x39], 1
mov byte [esp + 0x3a], 0
mov ebp, 3
jne 0x42e280
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
push eax
push ecx
lea edx, [esp + 0x45]
push edx
mov byte [esp + 0x47], 3
mov byte [esp + 0x48], al
call fcn.00448250
mov ebp, dword [esp + 0x28]
add esp, 0xc
add ebp, 5
mov eax, dword [esp + 0x2e4]
mov edi, dword [esp + 0x30]
mov ecx, eax
sar ecx, 8
mov byte [esp + ebp + 0x38], cl
inc ebp
mov byte [esp + ebp + 0x38], al
lea edx, [esp + 0x24]
push edx
inc ebp
lea eax, [esp + 0x3c]
push ebp
push eax
mov edx, edi
mov eax, ebx
call fcn.00414400
add esp, 0xc
test eax, eax
jne 0x42e53e
cmp ebp, dword [esp + 0x24]
jne 0x42e53e
lea ecx, [esp + 0x20]
push ecx
lea esi, [eax + 0xa]
push esi
lea edx, [esp + 0x40]
push edx
push edi
push ebx
call fcn.0042d620
add esp, 0x14
test eax, eax
jne 0x42e3c5
cmp dword [esp + 0x20], esi
jne 0x42e3c5
cmp byte [esp + 0x38], 5
je 0x42e38e
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x42e590
mov ecx, dword [esp + 0x2e4]
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x18]
push eax
push ecx
push edx
push ebx
call fcn.004204b0
add esp, 0x10
cmp eax, 0xffffffff
je 0x42e384
cmp eax, 1
jne 0x42e2c0
lea eax, [esp + 0x18]
push eax
mov edi, ebx
call fcn.00420e10
add esp, 4
test eax, eax
jne 0x42e5a1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x42e36e
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x42e36e
mov edi, eax
push 0x40
lea esi, [esp + 0x294]
mov ecx, edi
call fcn.00420170
add esp, 4
cmp dword [edi + 4], 2
jne 0x42e335
mov byte [esp + 0x3b], 1
mov eax, dword [edi + 0x18]
movzx ecx, byte [eax + 4]
mov byte [esp + 0x3c], cl
movzx edx, byte [eax + 5]
mov byte [esp + 0x3d], dl
movzx ecx, byte [eax + 6]
mov byte [esp + 0x3e], cl
movzx edx, byte [eax + 7]
mov ecx, dword [esp + 0x10]
mov eax, esi
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved__n
mov byte [esp + 0x47], dl
mov ebp, 8
call fcn.004140b0
jmp 0x42e353
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x290]
push ecx
push str.SOCKS5_connection_to__s_not_supported_n
mov dword [esp + 0x24], 0
call fcn.00414140
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
add esp, 8
call fcn.00420630
cmp dword [esp + 0x1c], 0
jne 0x42e1fe
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
push edx
push str.Failed_to_resolve___s__for_SOCKS5_connect.
call fcn.00414140
add esp, 8
mov eax, 6
jmp 0x42e5a1
mov al, byte [esp + 0x3b]
cmp al, 3
jne 0x42e3cf
movzx esi, byte [esp + 0x3c]
add esi, 7
cmp esi, 0xa
jle 0x42e3de
lea eax, [esp + 0x20]
push eax
lea ebp, [esi - 0xa]
push ebp
lea ecx, [esp + 0x4a]
push ecx
push edi
push ebx
call fcn.0042d620
add esp, 0x14
test eax, eax
jne 0x42e3c5
cmp ebp, dword [esp + 0x20]
je 0x42e3da
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x42e590
cmp al, 4
jne 0x42e3de
mov esi, 0x16
jmp 0x42e3a3
mov al, byte [esp + 0x3b]
mov cl, byte [esp + 0x39]
test cl, cl
je 0x42e510
cmp al, 1
jne 0x42e435
movzx eax, byte [esp + 0x40]
movzx edx, cl
movzx ecx, byte [esp + 0x41]
push edx
movzx edx, byte [esp + 0x43]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x41]
push eax
movzx eax, byte [esp + 0x46]
push edx
movzx edx, byte [esp + 0x48]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
call fcn.00414140
add esp, 0x1c
mov eax, 7
jmp 0x42e5a1
cmp al, 3
jne 0x42e479
mov bl, byte [esp + esi + 0x36]
movzx ecx, byte [esp + esi + 0x37]
lea esi, [esp + esi + 0x38]
mov byte [esi - 2], 0
movzx eax, byte [esp + 0x39]
movzx edx, bl
push eax
shl edx, 8
or ecx, edx
push ecx
lea eax, [esp + 0x45]
push eax
mov eax, dword [esp + 0x1c]
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
call fcn.00414140
add esp, 0x10
mov eax, 7
jmp 0x42e5a1
cmp al, 4
jne 0x42e506
movzx edx, byte [esp + 0x4c]
movzx eax, byte [esp + 0x4d]
movzx ecx, cl
push ecx
movzx ecx, byte [esp + 0x4f]
shl edx, 8
or edx, eax
movzx eax, byte [esp + 0x4d]
push edx
movzx edx, byte [esp + 0x52]
push ecx
movzx ecx, byte [esp + 0x54]
push edx
movzx edx, byte [esp + 0x57]
push eax
movzx eax, byte [esp + 0x5a]
push ecx
movzx ecx, byte [esp + 0x5d]
push edx
movzx edx, byte [esp + 0x60]
push eax
movzx eax, byte [esp + 0x63]
push ecx
movzx ecx, byte [esp + 0x66]
push edx
movzx edx, byte [esp + 0x69]
push eax
movzx eax, byte [esp + 0x6c]
push ecx
movzx ecx, byte [esp + 0x6f]
push edx
movzx edx, byte [esp + 0x72]
push eax
movzx eax, byte [esp + 0x75]
push ecx
movzx ecx, byte [esp + 0x78]
push edx
push eax
mov eax, dword [esp + 0x54]
push ecx
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_
call fcn.00414140
add esp, 0x4c
mov eax, 7
jmp 0x42e5a1
mov ecx, dword [esp + 0x10]
push str.SOCKS5_request_granted._n
call fcn.004140b0
add esp, 4
lea edx, [esp + 0x2c]
push edx
push 0x8004667e
push edi
mov dword [esp + 0x38], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x42e5a1
push str.Failed_to_send_SOCKS5_connect_request.
jmp 0x42e590
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x42e590
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x42e590
cmp al, 1
jne 0x42e55e
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x42e590
cmp al, 0xff
jne 0x42e57d
mov eax, dword [esp + 0x18]
test eax, eax
je 0x42e576
cmp byte [eax], 0
je 0x42e576
push str.No_authentication_method_was_acceptable.
jmp 0x42e590
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 0x42e590
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x42e590
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x42e590
push str.Unable_to_send_initial_SOCKS5_request.
mov eax, dword [esp + 0x14]
call fcn.00414140
mov eax, 7
add esp, 4
mov ecx, dword [esp + 0x2d4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004453f2
add esp, 0x2cc
ret