Function at 0x4a2070
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2cc
mov eax, dword [0x4d0b80]
xor eax, esp
mov dword [esp + 0x2c8], eax
mov ecx, dword [esp + 0x2d4]
mov eax, dword [esp + 0x2d0]
mov edx, dword [esp + 0x2e0]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2f0]
mov ebp, dword [esi + edx*4 + 0x1a8]
mov dword [esp + 0x28], ecx
xor ecx, ecx
cmp dword [esi + 0xcc], 5
push edi
mov edi, dword [esi]
sete cl
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2e8]
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ecx
lea ecx, [eax + 1]
jmp 0x4a20e0
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4a20e0
mov edx, dword [edi + 0x194]
sub eax, ecx
cmp dword [esi + 0x2b4], 0
mov ebx, eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0
je 0x4a2125
mov eax, dword [esp + 0x2ec]
mov ecx, dword [esp + 0x20]
push eax
push ecx
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
push edi
call fcn.0048e8b0
add esp, 0x10
cmp dword [esp + 0x1c], 0
jne 0x4a214d
cmp ebx, 0xff
jbe 0x4a214d
mov edx, dword [esi]
push ebx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push edx
call fcn.0048e8b0
add esp, 0xc
mov dword [esp + 0x1c], 1
push 1
push 0
push edi
call fcn.004932c0
mov ebx, edx
add esp, 0xc
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ebx
test ebx, ebx
jg 0x4a2183
jl 0x4a216e
test eax, eax
jae 0x4a2183
push str.Connection_time_out
push edi
call fcn.0048e940
mov eax, 0x1c
jmp 0x4a28d6
push 1
push ebp
call fcn.004a8de0
mov eax, dword [esp + 0x38]
push ebx
push eax
push ebp
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.00483000
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x4a21b0
mov ecx, dword [esi]
push str.SOCKS5:_no_connection_here
push ecx
jmp 0x4a28cc
test eax, eax
jne 0x4a21cb
mov edx, dword [esi]
push str.SOCKS5:_connection_timeout
push edx
call fcn.0048e940
mov eax, 0x1c
jmp 0x4a28d6
test al, 4
je 0x4a21dc
mov eax, dword [esi]
push str.SOCKS5:_error_occurred_during_connection
push eax
jmp 0x4a28cc
mov ebx, dword [esp + 0x14]
test ebx, 0xfffffffa
je 0x4a21f9
mov ecx, dword [esi]
push ebx
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu_n
push ecx
call fcn.0048e8b0
add esp, 0xc
test bl, 1
jne 0x4a2206
mov dword [esp + 0x24], 0
test bl, 4
mov ebx, 1
jne 0x4a2214
mov ebx, dword [esp + 0x18]
mov byte [esp + 0x40], 5
mov byte [esp + 0x42], 0
mov eax, 3
test ebx, ebx
je 0x4a2231
mov byte [esp + 0x43], 1
mov eax, 4
cmp dword [esp + 0x24], 0
je 0x4a223e
mov byte [esp + eax + 0x40], 2
inc eax
sub al, 2
push 0
push ebp
mov byte [esp + 0x49], al
call fcn.004a8de0
mov edx, dword [esp + 0x2f4]
mov eax, dword [esp + 0x28]
push edx
push eax
push str.SOCKS5_communication_to__s:_d_n
push edi
call fcn.0048e8b0
movzx edx, byte [esp + 0x59]
lea ecx, [esp + 0x40]
push ecx
add edx, 2
push edx
lea eax, [esp + 0x60]
push eax
push ebp
push esi
call fcn.0048eec0
add esp, 0x2c
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4a28c6
movzx ecx, byte [esp + 0x41]
add ecx, 2
cmp dword [esp + 0x28], ecx
jne 0x4a28c6
push 1
push ebp
call fcn.004a8de0
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
push edx
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.00483000
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x4a22d0
mov ecx, dword [esi]
push str.SOCKS5_nothing_to_read
push ecx
jmp 0x4a28cc
test eax, eax
jne 0x4a22eb
mov edx, dword [esi]
push str.SOCKS5_read_timeout
push edx
call fcn.0048e940
mov eax, 0x1c
jmp 0x4a28d6
test al, 4
je 0x4a2306
mov eax, dword [esi]
push str.SOCKS5_read_error_occurred
push eax
call fcn.0048e940
mov eax, 0x38
jmp 0x4a28d6
push 0
push ebp
call fcn.004a8de0
lea ecx, [esp + 0x20]
push ecx
push 2
lea edx, [esp + 0x50]
push edx
push ebp
push esi
call fcn.004a1ac0
add esp, 0x1c
test eax, eax
jne 0x4a28bf
cmp dword [esp + 0x18], 2
jne 0x4a28bf
cmp byte [esp + 0x40], 5
je 0x4a2348
push str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x4a28cb
mov al, byte [esp + 0x41]
test al, al
je 0x4a249d
test ebx, ebx
je 0x4a2383
cmp al, 1
jne 0x4a2383
mov eax, dword [esp + 0x2f0]
push esi
push eax
call fcn.004ac6f0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x4a249d
push str.Unable_to_negotiate_SOCKS5_GSS_API_context.
jmp 0x4a28cb
cmp al, 2
jne 0x4a288a
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4a23bf
mov edi, dword [esp + 0x2c]
test edi, edi
je 0x4a23bf
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a23a0
sub eax, edx
mov dword [esp + 0x14], eax
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a23b2
sub eax, edx
mov ebx, eax
jmp 0x4a23c5
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x40], 1
mov byte [esp + 0x41], al
test ecx, ecx
je 0x4a23f3
test eax, eax
je 0x4a23f3
mov edx, eax
push edx
push ecx
lea eax, [esp + 0x4a]
push eax
call fcn.00450960
mov eax, dword [esp + 0x20]
add esp, 0xc
lea edi, [eax + 2]
mov byte [esp + edi + 0x40], bl
inc edi
cmp dword [esp + 0x2c], 0
je 0x4a2419
test ebx, ebx
je 0x4a2419
mov ecx, dword [esp + 0x2c]
push ebx
push ecx
lea edx, [esp + edi + 0x48]
push edx
call fcn.00450960
add esp, 0xc
lea eax, [esp + 0x28]
push eax
add edi, ebx
push edi
lea ecx, [esp + 0x48]
push ecx
push ebp
push esi
call fcn.0048eec0
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4a287e
cmp edi, dword [esp + 0x28]
jne 0x4a287e
lea edx, [esp + 0x18]
push edx
push 2
lea eax, [esp + 0x48]
push eax
push ebp
push esi
call fcn.004a1ac0
add esp, 0x14
test eax, eax
jne 0x4a2872
cmp dword [esp + 0x18], 2
jne 0x4a2872
mov al, byte [esp + 0x41]
test al, al
je 0x4a249d
movzx edx, byte [esp + 0x40]
movzx ecx, al
mov eax, dword [esp + 0x10]
push ecx
push edx
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push eax
call fcn.0048e940
add esp, 0x10
mov eax, 7
jmp 0x4a28d9
cmp dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x40], 5
mov byte [esp + 0x41], 1
mov byte [esp + 0x42], 0
mov edi, 3
jne 0x4a2519
mov ebx, dword [esp + 0x3c]
push ebx
push ecx
lea edx, [esp + 0x4d]
push edx
mov byte [esp + 0x4f], 3
mov byte [esp + 0x50], bl
call fcn.00450960
lea edi, [ebx + 5]
mov ebx, dword [esp + 0x2f8]
add esp, 0xc
mov edx, ebx
sar edx, 8
mov byte [esp + edi + 0x40], dl
inc edi
mov byte [esp + edi + 0x40], bl
inc edi
cmp dword [esi + 0x658], 0
je 0x4a2625
mov ebp, dword [esp + 0x10]
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push ebp
call fcn.0048e940
mov ebx, dword [esp + 0x40]
add esp, 8
jmp 0x4a2646
mov ebx, dword [esp + 0x2ec]
lea eax, [esp + 0x1c]
push eax
push ebx
push ecx
push esi
call fcn.00485a40
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a261b
cmp eax, 1
jne 0x4a2559
lea edx, [esp + 0x1c]
push edx
push esi
call fcn.00483b70
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x4a2559
jmp 0x4a28d9
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a2604
mov ebp, dword [eax]
test ebp, ebp
je 0x4a2604
push 0x40
lea eax, [esp + 0x29c]
push eax
push ebp
call fcn.004855c0
add esp, 0xc
cmp dword [ebp + 4], 2
jne 0x4a25ce
mov byte [esp + 0x43], 1
mov eax, dword [ebp + 0x18]
movzx ecx, byte [eax + 4]
mov byte [esp + 0x44], cl
movzx edx, byte [eax + 5]
mov byte [esp + 0x45], dl
movzx ecx, byte [eax + 6]
mov byte [esp + 0x46], cl
movzx edx, byte [eax + 7]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x298]
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved__n
push ecx
mov byte [esp + 0x53], dl
mov edi, 8
call fcn.0048e8b0
jmp 0x4a25e7
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x298]
push edx
push str.SOCKS5_connection_to__s_not_supported_n
push eax
xor ebp, ebp
call fcn.0048e940
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
add esp, 0xc
push ecx
push edx
call fcn.00486090
add esp, 8
test ebp, ebp
jne 0x4a24e2
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
push eax
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push ecx
call fcn.0048e940
add esp, 0xc
mov eax, 6
jmp 0x4a28d9
mov ebx, dword [esp + 0x38]
lea eax, [esp + 0x28]
push eax
push edi
lea ecx, [esp + 0x48]
push ecx
push ebx
push esi
call fcn.0048eec0
mov ebp, dword [esp + 0x24]
add esp, 0x14
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
jne 0x4a286a
cmp edi, dword [esp + 0x28]
jne 0x4a286a
cmp dword [esi + 0x658], 0
mov edi, 0xa
je 0x4a2682
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push ebp
call fcn.0048e940
add esp, 8
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push ebp
jmp 0x4a28cc
lea edx, [esp + 0x18]
push edx
push 0xa
lea eax, [esp + 0x48]
push eax
push ebx
push esi
call fcn.004a1ac0
add esp, 0x14
test eax, eax
jne 0x4a2677
cmp dword [esp + 0x18], edi
jne 0x4a2677
cmp byte [esp + 0x40], 5
je 0x4a26b4
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push ebp
jmp 0x4a28cc
mov al, byte [esp + 0x43]
mov dl, byte [esp + 0x44]
cmp al, 3
jne 0x4a26c8
movzx edi, dl
add edi, 7
jmp 0x4a26d1
cmp al, 4
jne 0x4a26d1
mov edi, 0x16
cmp dword [esi + 0x658], 0
jne 0x4a2718
cmp edi, 0xa
jle 0x4a2718
lea ecx, [esp + 0x18]
push ecx
lea ebp, [edi - 0xa]
push ebp
lea edx, [esp + 0x52]
push edx
push ebx
push esi
call fcn.004a1ac0
add esp, 0x14
test eax, eax
jne 0x4a2701
cmp ebp, dword [esp + 0x18]
je 0x4a2710
mov eax, dword [esp + 0x10]
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push eax
jmp 0x4a28cc
mov dl, byte [esp + 0x44]
mov al, byte [esp + 0x43]
mov cl, byte [esp + 0x41]
test cl, cl
je 0x4a284c
cmp al, 1
jne 0x4a276e
movzx eax, byte [esp + 0x48]
movzx ecx, cl
push ecx
movzx ecx, byte [esp + 0x4d]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x4a]
push eax
movzx eax, byte [esp + 0x4f]
push eax
movzx eax, byte [esp + 0x51]
push ecx
movzx ecx, dl
mov edx, dword [esp + 0x20]
push eax
push ecx
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push edx
call fcn.0048e940
add esp, 0x20
mov eax, 7
jmp 0x4a28d9
cmp al, 3
jne 0x4a27b3
mov bl, byte [esp + edi + 0x3e]
movzx ecx, byte [esp + edi + 0x3f]
lea esi, [esp + edi + 0x40]
mov byte [esi - 2], 0
movzx eax, byte [esp + 0x41]
movzx edx, bl
push eax
shl edx, 8
or ecx, edx
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x4d]
push eax
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push ecx
call fcn.0048e940
add esp, 0x14
mov eax, 7
jmp 0x4a28d9
cmp al, 4
jne 0x4a2842
movzx eax, cl
movzx ecx, byte [esp + 0x54]
push eax
movzx eax, byte [esp + 0x59]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x56]
push ecx
movzx ecx, byte [esp + 0x5b]
push ecx
movzx ecx, byte [esp + 0x5d]
push eax
movzx eax, byte [esp + 0x60]
push ecx
movzx ecx, byte [esp + 0x63]
push eax
movzx eax, byte [esp + 0x66]
push ecx
movzx ecx, byte [esp + 0x69]
push eax
movzx eax, byte [esp + 0x6c]
push ecx
movzx ecx, byte [esp + 0x6f]
push eax
movzx eax, byte [esp + 0x72]
push ecx
movzx ecx, byte [esp + 0x75]
push eax
movzx eax, byte [esp + 0x78]
push ecx
movzx ecx, byte [esp + 0x7b]
push eax
movzx eax, byte [esp + 0x7e]
push ecx
movzx ecx, byte [esp + 0x81]
push eax
mov eax, dword [esp + 0x50]
push ecx
movzx edx, dl
push edx
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 eax
call fcn.0048e940
add esp, 0x50
mov eax, 7
jmp 0x4a28d9
mov ecx, dword [esp + 0x10]
push str.SOCKS5_request_granted._n
push ecx
call fcn.0048e8b0
push 1
push ebx
call fcn.004a8de0
add esp, 0x10
xor eax, eax
jmp 0x4a28d9
push str.Failed_to_send_SOCKS5_connect_request.
push ebp
jmp 0x4a28cc
mov edx, dword [esp + 0x10]
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push edx
jmp 0x4a28cc
mov eax, dword [esp + 0x10]
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push eax
jmp 0x4a28cc
test ebx, ebx
jne 0x4a2899
cmp al, 1
jne 0x4a2899
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x4a28cb
cmp al, 0xff
jne 0x4a28b8
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4a28b1
cmp byte [eax], 0
je 0x4a28b1
push str.No_authentication_method_was_acceptable.
jmp 0x4a28cb
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 0x4a28cb
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x4a28cb
push str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x4a28cb
push str.Unable_to_send_initial_SOCKS5_request.
push edi
call fcn.0048e940
mov eax, 7
add esp, 8
mov ecx, dword [esp + 0x2d8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004513b1
add esp, 0x2cc
ret