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

Disassembly:
sub esp, 0x284
mov eax, dword [0x4e0490]
xor eax, esp
mov dword [esp + 0x280], eax
mov edx, dword [esp + 0x298]
mov ecx, dword [esp + 0x28c]
mov eax, dword [esp + 0x288]
push ebx
push ebp
mov ebp, dword [esp + 0x2a4]
push esi
push edi
mov edi, dword [ebp + edx*4 + 0x154]
xor edx, edx
cmp dword [ebp + 0x138], 5
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp]
sete dl
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2a0]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
lea ecx, [eax + 1]
mov esi, edx
mov dword [esp + 0x30], esi
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4a38e0
sub eax, ecx
mov ebx, eax
mov dword [esp + 0x34], ebx
test esi, esi
jne 0x4a3916
cmp ebx, 0xff
jbe 0x4a3916
mov eax, dword [esp + 0x10]
push ebx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
push eax
call fcn.00488950
add esp, 0xc
mov dword [esp + 0x30], 1
mov ecx, dword [esp + 0x10]
push 1
push 0
push ecx
call fcn.0048a9f0
mov esi, eax
add esp, 0xc
test esi, esi
jge 0x4a3946
mov edx, dword [esp + 0x10]
push str.Connection_time_out
push edx
call fcn.004889e0
mov eax, 0x1c
jmp 0x4a3fd5
push 1
push edi
call fcn.004a8540
push esi
push edi
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.0047dd40
add esp, 0x18
cmp eax, 0xffffffff
jne 0x4a396e
mov eax, dword [ebp]
push str.SOCKS5:_no_connection_here
jmp 0x4a3fca
test eax, eax
jne 0x4a398a
mov ecx, dword [ebp]
push str.SOCKS5:_connection_timeout
push ecx
call fcn.004889e0
mov eax, 0x1c
jmp 0x4a3fd5
test al, 4
je 0x4a399c
mov edx, dword [ebp]
push str.SOCKS5:_error_occurred_during_connection
push edx
jmp 0x4a3fcb
cmp dword [esp + 0x14], 0
push 0
setne al
add al, 2
push edi
mov byte [esp + 0x40], 5
mov byte [esp + 0x41], al
mov byte [esp + 0x42], 0
mov byte [esp + 0x43], 1
mov byte [esp + 0x44], 2
call fcn.004a8540
movzx edx, byte [esp + 0x41]
lea ecx, [esp + 0x2c]
push ecx
add edx, 2
push edx
lea eax, [esp + 0x48]
push eax
push edi
push ebp
call fcn.00488bf0
add esp, 0x1c
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4a3fc1
movzx ecx, byte [esp + 0x39]
add ecx, 2
cmp dword [esp + 0x24], ecx
jne 0x4a3fc1
push 1
push edi
call fcn.004a8540
push esi
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
call fcn.0047dd40
add esp, 0x18
cmp eax, 0xffffffff
jne 0x4a3a2a
mov edx, dword [ebp]
push str.SOCKS5_nothing_to_read
push edx
jmp 0x4a3fcb
test eax, eax
jne 0x4a3a46
mov eax, dword [ebp]
push str.SOCKS5_read_timeout
push eax
call fcn.004889e0
mov eax, 0x1c
jmp 0x4a3fd5
test al, 4
je 0x4a3a62
mov ecx, dword [ebp]
push str.SOCKS5_read_error_occurred
push ecx
call fcn.004889e0
mov eax, 0x38
jmp 0x4a3fd5
push 0
push edi
call fcn.004a8540
lea edx, [esp + 0x28]
push edx
push 2
lea eax, [esp + 0x48]
push eax
push edi
push ebp
call fcn.004a3310
add esp, 0x1c
test eax, eax
jne 0x4a3fb5
cmp dword [esp + 0x20], 2
jne 0x4a3fb5
cmp byte [esp + 0x38], 5
je 0x4a3aa9
mov ecx, dword [esp + 0x10]
push str.Received_invalid_version_in_initial_SOCKS5_response.
push ecx
jmp 0x4a3fcb
mov al, byte [esp + 0x39]
test al, al
je 0x4a3bfd
cmp al, 1
jne 0x4a3ae0
mov edx, dword [esp + 0x2a8]
push ebp
push edx
call fcn.004ab720
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x4a3bfd
push str.Unable_to_negotiate_SOCKS5_GSS_API_context.
jmp 0x4a3fc6
cmp al, 2
jne 0x4a3f85
xor ebx, ebx
cmp dword [esp + 0x14], ebx
je 0x4a3b21
mov esi, dword [esp + 0x1c]
cmp esi, ebx
je 0x4a3b21
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a3b00
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 0x4a3b14
sub eax, esi
mov ebx, eax
jmp 0x4a3b27
mov dword [esp + 0x18], ebx
mov ecx, ebx
mov eax, dword [esp + 0x14]
mov byte [esp + 0x38], 1
mov byte [esp + 0x39], cl
test eax, eax
je 0x4a3b4f
test ecx, ecx
je 0x4a3b4f
push ecx
push eax
lea ecx, [esp + 0x42]
push ecx
call fcn.00450420
mov ecx, dword [esp + 0x24]
add esp, 0xc
lea esi, [ecx + 2]
mov byte [esp + esi + 0x38], bl
inc esi
cmp dword [esp + 0x1c], 0
je 0x4a3b75
test ebx, ebx
je 0x4a3b75
mov edx, dword [esp + 0x1c]
push ebx
push edx
lea eax, [esp + esi + 0x40]
push eax
call fcn.00450420
add esp, 0xc
lea ecx, [esp + 0x24]
push ecx
add esi, ebx
push esi
lea edx, [esp + 0x40]
push edx
push edi
push ebp
call fcn.00488bf0
add esp, 0x14
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4a3f79
cmp esi, dword [esp + 0x24]
jne 0x4a3f79
lea eax, [esp + 0x20]
push eax
push 2
lea ecx, [esp + 0x40]
push ecx
push edi
push ebp
call fcn.004a3310
add esp, 0x14
test eax, eax
jne 0x4a3f72
cmp dword [esp + 0x20], 2
jne 0x4a3f72
mov al, byte [esp + 0x39]
test al, al
je 0x4a3bf9
mov ecx, dword [esp + 0x10]
movzx edx, al
movzx eax, byte [esp + 0x38]
push edx
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push ecx
call fcn.004889e0
add esp, 0x10
mov eax, 7
jmp 0x4a3fd8
mov ebx, dword [esp + 0x34]
cmp dword [esp + 0x30], 0
mov byte [esp + 0x38], 5
mov byte [esp + 0x39], 1
mov byte [esp + 0x3a], 0
mov esi, 3
jne 0x4a3c79
mov edx, dword [esp + 0x28]
push ebx
push edx
lea eax, [esp + 0x45]
push eax
mov byte [esp + 0x47], 3
mov byte [esp + 0x48], bl
call fcn.00450420
add esp, 0xc
lea esi, [ebx + 5]
mov eax, dword [esp + 0x2a4]
mov ecx, eax
sar ecx, 8
mov byte [esp + esi + 0x38], cl
inc esi
mov byte [esp + esi + 0x38], al
inc esi
cmp dword [ebp + 0x5b8], 0
je 0x4a3d66
mov ebx, dword [esp + 0x10]
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push ebx
call fcn.004889e0
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
add esp, 8
jmp 0x4a3d83
mov edx, dword [esp + 0x2a4]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
push ebp
call fcn.0047f5c0
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a3d5c
cmp eax, 1
jne 0x4a3cbc
lea ecx, [esp + 0x1c]
push ecx
push ebp
call fcn.0047e710
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4a3fd8
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4a3d45
mov eax, dword [ecx]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4a3d45
cmp dword [eax + 4], 2
jne 0x4a3d24
mov edx, eax
mov byte [esp + 0x3b], 1
mov eax, dword [edx + 0x18]
lea edi, [esp + 0x38]
lea ecx, [esp + 0x3c]
dec edi
sub eax, ecx
mov esi, 4
lea ebx, [eax + 4]
lea edx, [ebx + esi]
mov al, byte [esp + edx + 0x38]
mov edx, dword [esp + 0x10]
mov byte [esp + esi + 0x38], al
movzx ecx, byte [edi + esi + 1]
inc esi
push ecx
push 0x4cb0b0
push edx
call fcn.00488950
add esp, 0xc
cmp esi, 8
jl 0x4a3cf5
mov ecx, dword [esp + 0x1c]
jmp 0x4a3d2c
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x10]
push ecx
push eax
call fcn.0047fa90
add esp, 8
cmp dword [esp + 0x14], 0
jne 0x4a3c37
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
push ecx
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push edx
call fcn.004889e0
add esp, 0xc
mov eax, 6
jmp 0x4a3fd8
mov edi, dword [esp + 0x2c]
lea edx, [esp + 0x24]
push edx
push esi
lea eax, [esp + 0x40]
push eax
push edi
push ebp
call fcn.00488bf0
mov ebx, dword [esp + 0x24]
add esp, 0x14
test eax, eax
jne 0x4a3f6a
cmp esi, dword [esp + 0x24]
jne 0x4a3f6a
lea esi, [eax + 0xa]
cmp dword [ebp + 0x5b8], eax
je 0x4a3db9
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push ebx
call fcn.004889e0
add esp, 8
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push ebx
jmp 0x4a3fcb
lea ecx, [esp + 0x20]
push ecx
push 0xa
lea edx, [esp + 0x40]
push edx
push edi
push ebp
call fcn.004a3310
add esp, 0x14
test eax, eax
jne 0x4a3f53
cmp dword [esp + 0x20], esi
jne 0x4a3f53
cmp byte [esp + 0x38], 5
je 0x4a3df3
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push ebx
jmp 0x4a3fcb
mov dl, byte [esp + 0x39]
mov al, byte [esp + 0x3b]
test dl, dl
je 0x4a3f0c
cmp al, 1
jne 0x4a3e4b
movzx ecx, byte [esp + 0x40]
movzx eax, dl
movzx edx, byte [esp + 0x41]
push eax
movzx eax, byte [esp + 0x43]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x41]
push ecx
movzx ecx, byte [esp + 0x46]
push eax
movzx eax, byte [esp + 0x48]
push ecx
push edx
push eax
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push ebx
call fcn.004889e0
add esp, 0x20
mov eax, 7
jmp 0x4a3fd8
cmp al, 3
jne 0x4a3e80
movzx eax, byte [esp + 0x41]
movzx ecx, dl
movzx edx, byte [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x2c]
shl edx, 8
or edx, eax
push edx
push ecx
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push ebx
call fcn.004889e0
add esp, 0x14
mov eax, 7
jmp 0x4a3fd8
cmp al, 4
jne 0x4a3f02
movzx eax, byte [esp + 0x40]
movzx ecx, byte [esp + 0x41]
movzx edx, dl
push edx
mov edx, eax
shl edx, 8
or edx, ecx
push edx
movzx edx, byte [esp + 0x53]
push edx
movzx edx, byte [esp + 0x56]
push edx
movzx edx, byte [esp + 0x59]
push edx
movzx edx, byte [esp + 0x5c]
push edx
movzx edx, byte [esp + 0x5f]
push edx
movzx edx, byte [esp + 0x62]
push edx
movzx edx, byte [esp + 0x65]
push edx
movzx edx, byte [esp + 0x68]
push edx
movzx edx, byte [esp + 0x6b]
push edx
movzx edx, byte [esp + 0x6e]
push edx
movzx edx, byte [esp + 0x6d]
push ecx
movzx ecx, byte [esp + 0x72]
push eax
movzx eax, byte [esp + 0x77]
push eax
movzx eax, byte [esp + 0x78]
push ecx
push edx
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.004889e0
add esp, 0x50
mov eax, 7
jmp 0x4a3fd8
cmp al, 3
jne 0x4a3f1a
movzx esi, byte [esp + 0x3c]
add esi, 7
jmp 0x4a3f23
cmp al, 4
jne 0x4a3f23
mov esi, 0x16
cmp dword [ebp + 0x5b8], 0
jne 0x4a3f5b
cmp esi, 0xa
jle 0x4a3f5b
lea ecx, [esp + 0x20]
push ecx
sub esi, 0xa
push esi
lea edx, [esp + 0x4a]
push edx
push edi
push ebp
call fcn.004a3310
add esp, 0x14
test eax, eax
jne 0x4a3f53
cmp esi, dword [esp + 0x20]
je 0x4a3f5b
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push ebx
jmp 0x4a3fcb
push 1
push edi
call fcn.004a8540
add esp, 8
xor eax, eax
jmp 0x4a3fd8
push str.Failed_to_send_SOCKS5_connect_request.
push ebx
jmp 0x4a3fcb
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x4a3fc6
mov ecx, dword [esp + 0x10]
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push ecx
jmp 0x4a3fcb
cmp al, 0xff
jne 0x4a3fa9
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a3fa2
cmp byte [eax], 0
je 0x4a3fa2
mov edx, dword [esp + 0x10]
push str.No_authentication_method_was_acceptable.
push edx
jmp 0x4a3fcb
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 0x4a3fc6
mov ecx, dword [esp + 0x10]
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push ecx
jmp 0x4a3fcb
mov edx, dword [esp + 0x10]
push str.Unable_to_receive_initial_SOCKS5_response.
push edx
jmp 0x4a3fcb
push str.Unable_to_send_initial_SOCKS5_request.
mov eax, dword [esp + 0x14]
push eax
call fcn.004889e0
mov eax, 7
add esp, 8
mov ecx, dword [esp + 0x290]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044bc4c
add esp, 0x284
ret