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

Disassembly:
push 0xffffffffffffffff
push 0x57f4a3
mov eax, dword fs:[0]
push eax
sub esp, 0x3f4
mov eax, dword [0x641030]
xor eax, esp
mov dword [esp + 0x3f0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
xor eax, esp
push eax
lea eax, [esp + 0x408]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x42c]
mov eax, dword [esp + 0x41c]
mov edx, dword [esp + 0x430]
mov esi, dword [esp + 0x438]
mov ebx, dword [esp + 0x428]
mov ebp, dword [esp + 0x418]
mov edi, dword [esp + 0x434]
push str.socks5Connect
mov dword [esp + 0x48], ecx
push esi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x70], edx
call fcn.00437740
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x410], 0
mov dword [eax], 0
call fcn.0042c960
mov ecx, ebx
call fcn.0048a8f0
lea ecx, [esp + 0x180]
mov dword [esp + 0x1c], eax
call fcn.0042d110
lea ecx, [esp + 0x180]
push ecx
mov ecx, ebx
mov byte [esp + 0x414], 1
call fcn.0042b4c0
lea ecx, [esp + 0x98]
call fcn.0042d110
lea edx, [esp + 0x98]
push edx
mov ecx, ebx
mov byte [esp + 0x414], 2
call fcn.0042b4e0
lea ecx, [esp + 0x1f4]
call fcn.0042d110
lea eax, [esp + 0x1f4]
push eax
mov ecx, ebx
mov byte [esp + 0x414], 3
call fcn.0042b500
cmp dword [esp + 0x1c], 0
mov ebx, dword [edi + 4]
je 0x509b28
lea ecx, [esp + 0x180]
call fcn.0042bab0
test eax, eax
je 0x509b28
test ebx, ebx
je 0x50912a
lea ecx, [esp + 0x268]
call fcn.0042d110
lea ecx, [esp + 0x180]
push ecx
lea ecx, [esp + 0x26c]
mov byte [esp + 0x414], 4
call fcn.0042eb10
push 0x3a
lea ecx, [esp + 0x26c]
call fcn.0042f880
mov edx, dword [esp + 0x420]
push edx
lea ecx, [esp + 0x26c]
call fcn.0042ff90
lea ecx, [esp + 0x268]
call fcn.0051b3b0
push eax
push str.Socks5Connect
mov ecx, ebx
call fcn.004851b0
lea ecx, [esp + 0x268]
mov byte [esp + 0x410], 3
call fcn.0042d1d0
mov eax, dword [esi]
mov edx, dword [eax + 0x24]
push 1
push str.SOCKS5
mov ecx, esi
call edx
lea eax, [esp + 0x180]
push eax
push str.socksHostname
mov ecx, esi
call fcn.004370f0
mov ecx, dword [esp + 0x1c]
push ecx
push str.socksPort
mov ecx, esi
call fcn.004373b0
lea edx, [esp + 0x98]
push edx
push str.socksUsername
mov ecx, esi
call fcn.004370f0
mov eax, dword [esi]
mov edx, dword [eax + 0x28]
mov ecx, esi
call edx
mov ecx, dword [esp + 0x40]
call fcn.0051b3b0
push eax
lea ecx, [esp + 0x110]
call fcn.0042d150
push 0x2e
lea ecx, [esp + 0x110]
mov byte [esp + 0x414], 5
call fcn.0042f270
mov ebx, dword [esp + 0x424]
test eax, eax
jne 0x509230
lea ecx, [esp + 0x2dc]
call fcn.0040e280
lea eax, [esp + 0x2dc]
push eax
push esi
push edi
lea ecx, [esp + 0x118]
push ebx
push ecx
mov byte [esp + 0x424], 6
call fcn.004acd90
add esp, 0x14
test al, al
je 0x50921c
lea ecx, [esp + 0x2dc]
call fcn.00411290
push eax
lea ecx, [esp + 0x110]
call fcn.0042ed20
cmp byte [esi + 0x121], 0
je 0x50921c
lea edx, [esp + 0x10c]
push edx
push str.usingIpAddress
mov ecx, esi
call fcn.004370f0
lea ecx, [esp + 0x2dc]
mov byte [esp + 0x410], 5
call fcn.0040e320
lea ecx, [esp + 0x10c]
call fcn.0042bc00
lea ecx, [esp + 0x10c]
call fcn.0042bab0
test eax, eax
jne 0x509273
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.No_target_hostname_for_SOCKS5_connection.
mov ecx, esi
call edx
lea ecx, [esp + 0x10c]
mov byte [esp + 0x410], 3
call fcn.0042d1d0
jmp 0x509b36
lea ecx, [esp + 0x10c]
call fcn.0051b3b0
lea ecx, [esp + 0x10c]
mov dword [esp + 0x38], eax
call fcn.0042bab0
xor edx, edx
mov dword [esp + 0x40], eax
mov byte [esp + 0x17], 0
test eax, eax
jle 0x5092bb
mov edi, edi
mov ecx, dword [esp + 0x38]
mov cl, byte [edx + ecx]
cmp cl, 0x2e
je 0x5092b6
cmp cl, 0x30
jl 0x509329
cmp cl, 0x39
jg 0x509329
inc edx
cmp edx, eax
jl 0x5092a0
lea edx, [esp + 0x8c]
push edx
lea eax, [esp + 0x98]
push eax
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0x78]
push edx
push str._d._d._d._d
push eax
call fcn.00435ef0
add esp, 0x18
cmp eax, 4
je 0x50932e
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Invalid_SOCKS5_destination_IP_address
mov ecx, esi
call eax
mov eax, dword [esp + 0x38]
mov edx, dword [esi]
mov edx, dword [edx + 0x2c]
push eax
push str.ipAddress3
mov ecx, esi
call edx
lea ecx, [esp + 0x10c]
mov byte [esp + 0x410], 3
call fcn.0042d1d0
jmp 0x509b36
mov byte [esp + 0x17], 1
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x1c]
push esi
push edi
push eax
push ecx
lea edx, [esp + 0x190]
push edx
mov ecx, ebp
call fcn.004b0030
test al, al
jne 0x5093a2
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_connect_to_SOCKS5_server.
mov ecx, esi
call edx
mov edi, dword [esi]
lea ecx, [esp + 0x180]
add edi, 0x2c
call fcn.0051b3b0
push eax
mov eax, dword [edi]
push str.socksHostname
mov ecx, esi
call eax
mov ecx, dword [esp + 0x1c]
push ecx
push str.socksPort
mov ecx, esi
call fcn.004373b0
lea ecx, [esp + 0x10c]
mov byte [esp + 0x410], 3
call fcn.0042d1d0
jmp 0x509b36
lea ecx, [esp + 0x98]
mov byte [esp + 0x30], 5
mov byte [esp + 0x31], 2
mov byte [esp + 0x32], 0
mov byte [esp + 0x33], 2
mov dword [esp + 0x3c], 0
call fcn.0042bab0
test eax, eax
je 0x5093f8
lea ecx, [esp + 0x1f4]
call fcn.0042bab0
test eax, eax
je 0x5093f8
push edi
push esi
lea edx, [esp + 0x44]
push edx
push ebx
push 0
push 0
push 0x800
push 4
lea eax, [esp + 0x50]
push eax
jmp 0x509423
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.No_SOCKS5_username_and_or_password__requesting_No_Authentication...
mov ecx, esi
call eax
push edi
push esi
lea ecx, [esp + 0x44]
push ecx
push ebx
push 0
push 0
push 0x800
push 3
lea edx, [esp + 0x50]
mov byte [esp + 0x51], 1
push edx
mov ecx, ebp
call fcn.004af0d0
test al, al
jne 0x509464
push str.Failed_to_send_version_identifier_to_SOCKS5_server.
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
mov ecx, esi
call edx
mov eax, dword [edi + 4]
push esi
push eax
push ebx
push 0
mov ecx, ebp
call fcn.004aeee0
lea ecx, [esp + 0x10c]
mov byte [esp + 0x410], 3
call fcn.0042d1d0
jmp 0x509b36
lea ecx, [esp + 0x20]
push ecx
push esi
push edi
push ebx
push 2
lea edx, [esp + 0x48]
push edx
mov ecx, ebp
mov dword [esp + 0x38], 0
call fcn.004affd0
test al, al
jne 0x50948d
push str.Failed_to_receive_method_select_reply_from_SOCKS5_server.
jmp 0x509433
mov ax, word [esp + 0x34]
test ah, ah
jne 0x5094b5
cmp byte [esi + 0x121], ah
je 0x5096a1
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.SOCKS5_server_is_allowing_no_authentication.
mov ecx, esi
call eax
jmp 0x5096a1
cmp ah, 2
jne 0x509afe
cmp byte [esi + 0x121], 0
je 0x5094d5
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.SOCKS5_server_selected_username_password_authentication.
mov ecx, esi
call eax
lea ecx, [esp + 0x70]
call fcn.00447240
push 1
lea ecx, [esp + 0x74]
mov byte [esp + 0x414], 7
call fcn.00447e40
lea ecx, [esp + 0x98]
call fcn.0042bab0
test eax, eax
jne 0x509548
push str.SOCKS5_username_is_empty.
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
mov ecx, dword [edi + 4]
push esi
push ecx
push ebx
push 0
mov ecx, ebp
call fcn.004aeee0
lea ecx, [esp + 0x70]
mov byte [esp + 0x410], 5
call fcn.004479b0
lea ecx, [esp + 0x10c]
mov byte [esp + 0x410], 3
call fcn.0042d1d0
jmp 0x509b36
lea ecx, [esp + 0x1f4]
call fcn.0042bab0
test eax, eax
jne 0x50955f
push str.SOCKS5_password_is_empty.
jmp 0x509506
lea ecx, [esp + 0x98]
call fcn.0042bab0
push eax
lea ecx, [esp + 0x74]
call fcn.00447e40
lea ecx, [esp + 0x98]
call fcn.0042bab0
push eax
lea ecx, [esp + 0x9c]
call fcn.0051b3b0
push eax
lea ecx, [esp + 0x78]
call fcn.00448260
lea ecx, [esp + 0x1f4]
call fcn.0042bab0
push eax
lea ecx, [esp + 0x74]
call fcn.00447e40
lea ecx, [esp + 0x1f4]
call fcn.0042bab0
push eax
lea ecx, [esp + 0x1f8]
call fcn.0051b3b0
push eax
lea ecx, [esp + 0x78]
call fcn.00448260
push edi
push esi
lea edx, [esp + 0x44]
push edx
push ebx
push 0
push 0
push 0x800
lea ecx, [esp + 0x8c]
call fcn.0051d090
push eax
lea ecx, [esp + 0x90]
call fcn.00446f60
push eax
mov ecx, ebp
call fcn.004af0d0
test al, al
jne 0x50961f
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_send_username_password_to_SOCKS5_server.
mov ecx, esi
call edx
mov eax, dword [edi + 4]
push esi
push eax
jmp 0x509514
lea ecx, [esp + 0x20]
push ecx
push esi
push edi
push ebx
push 2
lea edx, [esp + 0x30]
push edx
mov ecx, ebp
call fcn.004affd0
test al, al
jne 0x509651
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_receive_username_password_reply_from_SOCKS5_server.
mov ecx, esi
call edx
mov eax, dword [edi + 4]
push esi
push eax
jmp 0x509514
cmp byte [esp + 0x1d], 0
je 0x509690
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.SOCKS5_server_rejected_username_password
mov ecx, esi
call eax
mov eax, dword [esi]
add eax, 0x2c
lea ecx, [esp + 0x98]
mov dword [esp + 0x48], eax
call fcn.0051b3b0
mov edx, dword [esp + 0x48]
push eax
mov eax, dword [edx]
push str.username
mov ecx, esi
call eax
jmp 0x50950f
lea ecx, [esp + 0x70]
mov byte [esp + 0x410], 5
call fcn.004479b0
lea ecx, [esp + 0x4c]
call fcn.00447240
push 5
lea ecx, [esp + 0x50]
mov byte [esp + 0x414], 8
call fcn.00447e40
push 1
lea ecx, [esp + 0x50]
call fcn.00447e40
push 0
lea ecx, [esp + 0x50]
call fcn.00447e40
cmp byte [esp + 0x17], 0
lea ecx, [esp + 0x4c]
je 0x509708
push 3
call fcn.00447e40
mov edx, dword [esp + 0x40]
push edx
lea ecx, [esp + 0x50]
call fcn.00447e40
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
push eax
push ecx
lea ecx, [esp + 0x54]
call fcn.00448260
jmp 0x509750
push 1
call fcn.00447e40
mov edx, dword [esp + 0x6c]
push edx
lea ecx, [esp + 0x50]
call fcn.00447e40
mov eax, dword [esp + 0x90]
push eax
lea ecx, [esp + 0x50]
call fcn.00447e40
mov ecx, dword [esp + 0x94]
push ecx
lea ecx, [esp + 0x50]
call fcn.00447e40
mov edx, dword [esp + 0x8c]
push edx
lea ecx, [esp + 0x50]
call fcn.00447e40
mov eax, dword [esp + 0x421]
push eax
lea ecx, [esp + 0x50]
call fcn.00447e40
mov ecx, dword [esp + 0x420]
push ecx
lea ecx, [esp + 0x50]
call fcn.00447e40
push edi
push esi
lea edx, [esp + 0x44]
push edx
push ebx
push 0
push 0
push 0x800
lea ecx, [esp + 0x68]
call fcn.0051d090
push eax
lea ecx, [esp + 0x6c]
call fcn.00446f60
push eax
mov ecx, ebp
call fcn.004af0d0
test al, al
jne 0x5097c8
push str.Failed_to_send_connection_request_to_SOCKS5_server.
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
mov ecx, esi
call edx
mov eax, dword [edi + 4]
push esi
push eax
push ebx
push 0
mov ecx, ebp
call fcn.004aeee0
lea ecx, [esp + 0x4c]
jmp 0x509522
lea ecx, [esp + 0x20]
push ecx
push esi
push edi
push ebx
push 4
lea edx, [esp + 0x2c]
push edx
mov ecx, ebp
call fcn.004affd0
test al, al
jne 0x5097e9
push str.Failed_to_receive_response_from_SOCKS5_server..
jmp 0x5097a7
cmp byte [esp + 0x19], 0
je 0x509828
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.SOCKS5_server_rejected_connection_request
mov ecx, esi
call eax
movzx ecx, byte [esp + 0x19]
push ecx
push str.status
mov ecx, esi
call fcn.004373b0
mov edx, dword [edi + 4]
push esi
push edx
push ebx
push 0
mov ecx, ebp
call fcn.004aeee0
lea ecx, [esp + 0x4c]
jmp 0x509522
cmp byte [esi + 0x121], 0
je 0x509843
movzx eax, byte [esp + 0x1b]
push eax
push str.responseAddressType
mov ecx, esi
call fcn.004373b0
mov al, byte [esp + 0x1b]
cmp al, 3
jne 0x509953
lea ecx, [esp + 0x20]
push ecx
push esi
push edi
push ebx
push 1
lea edx, [esp + 0x2c]
push edx
mov ecx, ebp
call fcn.004affd0
test al, al
je 0x50992d
cmp byte [esi + 0x121], 0
movzx eax, byte [esp + 0x18]
mov dword [esp + 0x1c], eax
je 0x509890
push eax
push str.domainNameLen
mov ecx, esi
call fcn.004373b0
mov eax, dword [esp + 0x1c]
cmp eax, 0xff
jbe 0x5098a3
mov dword [esp + 0x1c], 0xff
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
push esi
push edi
push ebx
push eax
lea edx, [esp + 0x2f0]
push edx
mov ecx, ebp
call fcn.004affd0
test al, al
jne 0x5098c9
push str.Failed_to_receive_domain_name_from_SOCKS5_server.
jmp 0x5097a7
cmp byte [esi + 0x121], 0
je 0x5098eb
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x2e0]
push edx
push str.domainName
mov ecx, esi
call fcn.00436d40
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x2e0]
push ecx
mov ecx, dword [esp + 0x4c]
call fcn.0042cf80
lea ecx, [esp + 0x20]
push ecx
push esi
push edi
push ebx
push 2
lea edx, [esp + 0x2c]
push edx
mov ecx, ebp
call fcn.004affd0
mov byte [esp + 0x17], al
test al, al
jne 0x509a2e
push str.Failed_to_receive_port_reply_from_SOCKS5_server.
jmp 0x5097a7
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_receive_domain_name_length_from_SOCKS5_server.
mov ecx, esi
call eax
mov ecx, dword [edi + 4]
push esi
push ecx
push ebx
push 0
mov ecx, ebp
call fcn.004aeee0
lea ecx, [esp + 0x4c]
jmp 0x509522
cmp al, 1
jne 0x5099fb
lea edx, [esp + 0x20]
push edx
push esi
push edi
push ebx
push 4
lea eax, [esp + 0x2c]
push eax
mov ecx, ebp
call fcn.004affd0
test al, al
jne 0x50999b
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_receive_IPv4_address_from_SOCKS5_server.
mov ecx, esi
call eax
mov ecx, dword [edi + 4]
push esi
push ecx
push ebx
push 0
mov ecx, ebp
call fcn.004aeee0
lea ecx, [esp + 0x4c]
jmp 0x509522
lea edx, [esp + 0x1b]
push edx
lea eax, [esp + 0x1e]
push eax
lea ecx, [esp + 0x21]
push ecx
lea edx, [esp + 0x24]
push edx
push str._b._b._b._b
lea eax, [esp + 0x27c]
push 0x64
push eax
call fcn.00435fd0
add esp, 0x1c
cmp byte [esi + 0x121], 0
je 0x5099e5
mov edx, dword [esi]
mov edx, dword [edx + 0x2c]
lea eax, [esp + 0x268]
push eax
push str.responseIpv4Addr
mov ecx, esi
call edx
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x268]
push eax
call fcn.0042cd60
jmp 0x509901
cmp al, 4
jne 0x509ad8
lea ecx, [esp + 0x20]
push ecx
push esi
push edi
push ebx
push 0x10
lea edx, [esp + 0x408]
push edx
mov ecx, ebp
call fcn.004affd0
test al, al
jne 0x509901
push str.Failed_to_receive_IPv6_address_from_SOCKS5_server.
jmp 0x5097a7
mov eax, dword [esp + 0x18]
movzx ecx, al
shl ecx, 8
movzx edx, ah
lea eax, [ecx + edx]
mov ecx, dword [esp + 0x68]
mov dword [ecx], eax
cmp byte [esi + 0x121], 0
je 0x509a5a
push eax
push str.responsePort
mov ecx, esi
call fcn.004373b0
lea ecx, [esp + 0x4c]
mov byte [esp + 0x410], 5
call fcn.004479b0
lea ecx, [esp + 0x10c]
mov byte [esp + 0x410], 3
call fcn.0042d1d0
lea ecx, [esp + 0x1f4]
mov byte [esp + 0x410], 2
call fcn.0042d1d0
lea ecx, [esp + 0x98]
mov byte [esp + 0x410], 1
call fcn.0042d1d0
lea ecx, [esp + 0x180]
mov byte [esp + 0x410], 0
call fcn.0042d1d0
lea ecx, [esp + 0x24]
mov dword [esp + 0x410], 0xffffffff
call fcn.004377b0
mov al, byte [esp + 0x17]
jmp 0x509b88
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Invalid_response_from_SOCKS5_server
mov ecx, esi
call eax
mov ecx, dword [edi + 4]
push esi
push ecx
push ebx
push 0
mov ecx, ebp
call fcn.004aeee0
lea ecx, [esp + 0x4c]
jmp 0x509522
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.No_acceptable_SOCKS5_methods
mov ecx, esi
call eax
movzx ecx, byte [esp + 0x35]
push ecx
push str.method
mov ecx, esi
call fcn.004373b0
mov edx, dword [edi + 4]
push esi
push edx
jmp 0x509441
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.No_SOCKS5_hostname_and_or_port
mov ecx, esi
call edx
lea ecx, [esp + 0x1f4]
mov byte [esp + 0x410], 2
call fcn.0042d1d0
lea ecx, [esp + 0x98]
mov byte [esp + 0x410], 1
call fcn.0042d1d0
lea ecx, [esp + 0x180]
mov byte [esp + 0x410], 0
call fcn.0042d1d0
lea ecx, [esp + 0x24]
mov dword [esp + 0x410], 0xffffffff
call fcn.004377b0
xor al, al
mov ecx, dword [esp + 0x408]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3f0]
xor ecx, esp
call fcn.005550b0
add esp, 0x400
ret