Function at 0x10183220
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x10373f78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x124], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x144], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x130], eax
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [esi + 0xc]
mov ebx, dword [esi + 0x88c]
mov dword [ebp - 0x134], eax
mov eax, dword [ebp + 0x20]
push 0xf8
mov dword [ebp - 0x14c], eax
lea eax, [ebp - 0x10c]
push 0
push eax
mov dword [ebp - 0x114], 0x6e6b6e75
mov dword [ebp - 0x110], 0x6e776f
call fcn.10267270
mov eax, dword [ebp - 0x134]
add esp, 0xc
mov ecx, dword [ebp - 0x130]
mov eax, dword [edi + eax*4 + 0x130]
mov dword [ebp - 0x13c], eax
lea edx, [ecx + 1]
mov al, byte [edi + 0x90]
cmp al, 5
mov byte [ebp - 0x12a], al
sete byte [ebp - 0x129]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101832d3
mov eax, dword [esi + 0x170]
sub ecx, edx
mov dword [ebp - 0x128], eax
xor eax, eax
mov dword [ebp - 0x148], ecx
xor ecx, ecx
mov dword [ebp - 0x138], eax
mov edx, dword [edi]
mov byte [ebp - 0x115], cl
cmp edx, 1
jl 0x10183314
mov dword [ebp - 0x11c], edx
cmp edx, 0x11
jl 0x101833e1
mov dword [ebp - 0x11c], edx
mov edx, dword [ebp - 0x14c]
cmp byte [edx], al
mov edx, dword [edi]
jne 0x101833e1
mov dword [ebp - 0x11c], edx
cmp edx, 1
je 0x101833e1
mov dword [edi], 1
cmp byte [edi + 0x240], al
je 0x10183361
push dword [ebp - 0x140]
push dword [ebp - 0x130]
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d
push esi
call fcn.10170c50
add esp, 0x10
cmp byte [ebp - 0x12a], 5
je 0x1018338d
mov eax, dword [ebp - 0x148]
cmp eax, 0xff
jbe 0x1018338d
push eax
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu_
push esi
call fcn.10170c50
add esp, 0xc
mov byte [ebp - 0x129], 1
mov ecx, dword [ebp - 0x128]
test ecx, 0xfffffffa
je 0x101833b0
push ecx
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu
push esi
call fcn.10170c50
mov ecx, dword [ebp - 0x128]
add esp, 0xc
test cl, 1
mov byte [ebx], 5
mov eax, 0
cmovne eax, dword [ebp - 0x124]
mov dword [ebp - 0x124], eax
test cl, 4
je 0x101833f8
mov byte [ebp - 0x115], 1
mov ecx, 4
mov word [ebx + 2], 0x100
jmp 0x10183408
mov edx, dword [ebp - 0x11c]
dec edx
cmp edx, 0xf
ja case.0x101833f1.5
jmp dword [edx*4 + 0x10183f5c]
mov byte [ebx + 2], 0
mov ecx, 3
mov byte [ebp - 0x115], 0
mov dword [ebp - 0x128], ecx
test eax, eax
je 0x1018341d
mov byte [ecx + ebx], 2
inc ecx
mov dword [ebp - 0x128], ecx
lea eax, [ecx - 2]
mov byte [ebx + 1], al
lea eax, [ebp - 0x120]
push eax
push ecx
push ebx
push dword [ebp - 0x13c]
push esi
call fcn.10171150
add esp, 0x14
test eax, eax
je 0x10183448
cmp eax, 0x51
jne 0x1018351f
mov edx, dword [ebp - 0x120]
mov eax, dword [ebp - 0x128]
mov ecx, dword [esi + 0xc]
cmp edx, eax
je 0x1018348f
cmp dword [ecx], 2
je 0x1018346c
mov dword [ecx], 2
mov edx, dword [ebp - 0x120]
sub eax, edx
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x120]
add eax, ebx
mov dword [edi + 8], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
cmp dword [ecx], 4
je case.0x101833f1.3
mov dword [ecx], 4
mov dword [edi + 4], 2
mov dword [edi + 8], ebx
lea eax, [ebp - 0x11c]
push eax
push dword [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x13c]
call fcn.10170d40
mov ecx, dword [ebp - 0x11c]
add esp, 0x10
test eax, eax
je 0x10183575
cmp eax, 0x51
je 0x1018359d
push str.Unable_to_receive_initial_SOCKS5_response.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0xf
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x120]
push eax
push dword [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x13c]
push esi
call fcn.10171150
add esp, 0x14
test eax, eax
je 0x10183543
cmp eax, 0x51
je 0x10183543
push str.Unable_to_send_initial_SOCKS5_request.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0x1d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x120]
cmp ecx, eax
je case.0x101833f1.3
sub eax, ecx
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x120]
add dword [edi + 8], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
test ecx, ecx
jne 0x1018359d
push str.Connection_to_proxy_closed
push esi
call fcn.10170b90
add esp, 8
mov eax, 3
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
cmp ecx, eax
je 0x101835c5
sub eax, ecx
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x11c]
add dword [edi + 8], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
cmp byte [ebx], 5
je 0x101835ee
push str.Received_invalid_version_in_initial_SOCKS5_response.
push esi
call fcn.10170b90
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov al, byte [ebx + 1]
test al, al
je 0x10183917
cmp al, 2
jne 0x10183674
mov eax, dword [esi + 0xc]
cmp dword [eax], 6
je case.0x101833f1.6
mov dword [eax], 6
mov eax, dword [ebp - 0x124]
test eax, eax
je 0x10183736
cmp dword [ebp - 0x144], 0
je 0x10183736
mov edx, eax
lea ecx, [edx + 1]
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x10183630
sub edx, ecx
mov ecx, dword [ebp - 0x144]
mov dword [ebp - 0x134], edx
lea eax, [ecx + 1]
mov dword [ebp - 0x128], eax
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10183650
sub ecx, dword [ebp - 0x128]
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0x128], ecx
mov byte [ebx], 1
mov byte [ebx + 1], dl
jmp 0x10183751
cmp al, 1
jne 0x101836ea
cmp byte [ebp - 0x115], 0
je 0x101836c6
mov eax, dword [esi + 0xc]
cmp dword [eax], 5
je 0x1018368f
mov dword [eax], 5
push esi
push dword [ebp - 0x134]
call fcn.10191930
add esp, 8
test eax, eax
je 0x10183712
push str.Unable_to_negotiate_SOCKS5_GSS_API_context.
push esi
call fcn.10170b90
add esp, 8
mov eax, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
push esi
call fcn.10170b90
add esp, 8
mov eax, 5
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
cmp al, 0xff
jne 0x10183712
push str.No_authentication_method_was_acceptable.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0x20
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
xor edx, edx
mov word [ebx], 1
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x134], edx
test eax, eax
je 0x10183795
test edx, edx
je 0x10183795
cmp edx, 0xff
jb 0x10183781
push str.Excessive_user_name_length_for_proxy_auth
push esi
call fcn.10170b90
add esp, 8
mov eax, 0xb
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
push edx
push eax
lea eax, [ebx + 2]
push eax
call fcn.10266cf0
mov edx, dword [ebp - 0x134]
add esp, 0xc
mov eax, dword [ebp - 0x128]
lea ecx, [edx + 2]
mov edx, dword [ebp - 0x144]
mov byte [ecx + ebx], al
inc ecx
mov dword [ebp - 0x134], ecx
test edx, edx
je 0x101837fb
test eax, eax
je 0x101837fb
cmp eax, 0xff
jbe 0x101837e1
push str.Excessive_password_length_for_proxy_auth
push esi
call fcn.10170b90
add esp, 8
mov eax, 0xa
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
push eax
push edx
lea eax, [ecx + ebx]
push eax
call fcn.10266cf0
mov eax, dword [ebp - 0x128]
add esp, 0xc
mov ecx, dword [ebp - 0x134]
add ecx, eax
mov eax, dword [esi + 0xc]
cmp dword [eax], 7
je 0x1018380b
mov dword [eax], 7
mov dword [edi + 4], ecx
mov dword [edi + 8], ebx
lea eax, [ebp - 0x120]
push eax
push dword [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x13c]
push esi
call fcn.10171150
add esp, 0x14
test eax, eax
je 0x1018385a
cmp eax, 0x51
je 0x1018385a
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x120]
cmp eax, ecx
jne 0x10183554
mov dword [edi + 8], ebx
mov dword [edi + 4], 2
mov eax, dword [esi + 0xc]
cmp dword [eax], 8
je case.0x101833f1.8
mov dword [eax], 8
lea eax, [ebp - 0x11c]
push eax
push dword [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x13c]
call fcn.10170d40
mov ecx, dword [ebp - 0x11c]
add esp, 0x10
test eax, eax
je 0x101838d1
cmp eax, 0x51
je 0x101838d9
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0xe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x10183ef5
mov eax, dword [edi + 4]
cmp ecx, eax
jne 0x101835a4
mov al, byte [ebx + 1]
test al, al
je 0x10183917
movzx eax, al
push eax
movzx eax, byte [ebx]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push esi
call fcn.10170b90
add esp, 0x10
mov eax, 0x21
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc]
cmp dword [eax], 9
je case.0x101833f1.9
mov dword [eax], 9
cmp byte [ebp - 0x129], 0
je 0x10183a78
lea eax, [ebp - 0x138]
push eax
push 0
push dword [ebp - 0x140]
push dword [ebp - 0x130]
push esi
call fcn.10178630
add esp, 0x14
cmp eax, 0xffffffff
je 0x10183afc
mov ecx, dword [esi + 0xc]
cmp eax, 1
jne 0x10183983
cmp dword [ecx], 0xa
je 0x10183f49
pop edi
pop esi
mov dword [ecx], 0xa
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
cmp dword [ecx], 0xb
je 0x1018398e
mov dword [ecx], 0xb
mov eax, dword [ebp - 0x138]
test eax, eax
je 0x10183b90
mov eax, dword [eax]
mov dword [ebp - 0x134], eax
test eax, eax
je 0x10183b90
push 0x100
lea ecx, [ebp - 0x114]
push ecx
push eax
call fcn.101785e0
lea ecx, [ebp - 0x114]
add esp, 0xc
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101839d0
push dword [ebp - 0x140]
sub ecx, edx
mov eax, 0x100
sub eax, ecx
push 0x103314e4
push eax
lea eax, [ebp - 0x114]
add eax, ecx
push eax
call fcn.10175480
mov eax, dword [ebp - 0x134]
add esp, 0x10
mov word [ebx], 0x105
mov byte [ebx + 2], 0
mov dword [ebp - 0x124], 3
mov ecx, dword [eax + 4]
cmp ecx, 2
jne 0x10183b12
mov byte [ebx + 3], 1
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x124], 8
movzx eax, byte [ecx + 4]
mov byte [ebx + 4], al
movzx eax, byte [ecx + 5]
mov byte [ebx + 5], al
movzx eax, byte [ecx + 6]
mov byte [ebx + 6], al
movzx eax, byte [ecx + 7]
mov byte [ebx + 7], al
lea eax, [ebp - 0x114]
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved_
push esi
call fcn.10170c50
add esp, 0xc
push dword [ebp - 0x138]
push esi
call fcn.10178b00
add esp, 8
jmp 0x10183c8b
mov word [ebx], 0x105
mov byte [ebx + 2], 0
jmp 0x10183bd4
push dword [ebp - 0x140]
push dword [ebp - 0x130]
push esi
call fcn.10177df0
add esp, 0xc
mov dword [ebp - 0x138], eax
test eax, eax
je 0x10183ad4
push dword [ebp - 0x130]
mov dword [esi + 0x958], eax
push str.SOCKS5:_hostname__s_found
push esi
mov byte [esi + 0x96c], 1
call fcn.10170c50
mov eax, dword [ebp - 0x138]
add esp, 0xc
test eax, eax
jne 0x1018399c
lea eax, [ebp - 0x138]
push eax
push esi
call fcn.10178a70
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x138]
test eax, eax
jne 0x1018399c
test ecx, ecx
je 0x10183f49
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
cmp ecx, 0x17
jne 0x10183b67
mov byte [ebx + 3], 4
xor ecx, ecx
mov edx, dword [eax + 0x18]
mov dword [ebp - 0x124], 0x14
nop word [eax + eax]
mov al, byte [edx + ecx + 8]
mov byte [ebx + ecx + 4], al
inc ecx
cmp ecx, 0x10
jl 0x10183b30
lea eax, [ebp - 0x114]
push eax
push str.SOCKS5_connect_to_IPv6__s__locally_resolved_
push esi
call fcn.10170c50
add esp, 0xc
push dword [ebp - 0x138]
push esi
call fcn.10178b00
add esp, 8
jmp 0x10183c8b
lea eax, [ebp - 0x114]
push eax
push str.SOCKS5_connection_to__s_not_supported
push esi
call fcn.10170b90
add esp, 0xc
push dword [ebp - 0x138]
push esi
call fcn.10178b00
add esp, 8
jmp 0x10183c8b
push dword [ebp - 0x130]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push esi
call fcn.10170b90
add esp, 0xc
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 0x12a], 5
mov ecx, 3
mov word [ebx], 0x105
mov byte [ebx + 2], al
je case.0x101833f1.13
cmp byte [edi + 0x24b], 0
je 0x10183c10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x130]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x10183edb
movups xmm0, xmmword [ebp - 0x14]
mov byte [ebx + 3], 4
mov dword [ebp - 0x124], 0x14
movups xmmword [ebx + 4], xmm0
jmp 0x10183c71
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 0x130]
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x10183c42
mov byte [ebx + 3], al
mov eax, dword [ebp - 0x134]
mov dword [ebx + 4], eax
mov dword [ebp - 0x124], 8
jmp 0x10183c71
mov eax, dword [ebp - 0x148]
push eax
push dword [ebp - 0x130]
mov byte [ebx + 3], 3
mov byte [ebx + 4], al
lea eax, [ebx + 5]
push eax
call fcn.10266cf0
mov eax, dword [ebp - 0x148]
add esp, 0xc
add eax, 5
mov dword [ebp - 0x124], eax
push dword [ebp - 0x140]
push dword [ebp - 0x130]
push str.SOCKS5_connect_to__s:_d__remotely_resolved_
push esi
call fcn.10170c50
add esp, 0x10
mov ecx, dword [ebp - 0x124]
mov edx, dword [ebp - 0x140]
mov eax, edx
sar eax, 8
mov byte [ecx + ebx], al
mov byte [ecx + ebx + 1], dl
cmp dword [edi + 0x438], 0
jne 0x10183d26
lea eax, [ecx + 2]
mov dword [edi + 8], ebx
mov dword [edi + 4], eax
mov eax, dword [esi + 0xc]
cmp dword [eax], 0xe
je case.0x101833f1.14
mov dword [eax], 0xe
lea eax, [ebp - 0x120]
push eax
push dword [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x13c]
push esi
call fcn.10171150
add esp, 0x14
test eax, eax
je 0x10183d0c
cmp eax, 0x51
je 0x10183d0c
push str.Failed_to_send_SOCKS5_connect_request.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x120]
cmp eax, ecx
jne 0x10183554
cmp dword [edi + 0x438], 0
je 0x10183d4a
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push esi
call fcn.10170b90
add esp, 8
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov dword [edi + 4], 0xa
mov dword [edi + 8], ebx
mov eax, dword [esi + 0xc]
cmp dword [eax], 0xf
je case.0x101833f1.15
mov dword [eax], 0xf
lea eax, [ebp - 0x11c]
push eax
push dword [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x13c]
call fcn.10170d40
mov ecx, dword [ebp - 0x11c]
add esp, 0x10
test eax, eax
je 0x10183db0
cmp eax, 0x51
je 0x10183db8
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x10183ef5
mov eax, dword [edi + 4]
cmp ecx, eax
jne 0x101835a4
cmp byte [ebx], 5
je 0x10183dec
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push esi
call fcn.10170b90
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov al, byte [ebx + 1]
test al, al
je 0x10183e2f
movzx edi, al
mov ebx, 0x19
push edi
push dword [ebp - 0x130]
push str.Cant_complete_SOCKS5_connection_to__s.___d_
push esi
call fcn.10170b90
add esp, 0x10
cmp edi, 9
jae 0x10183e1c
mov ebx, dword [edi*4 + 0x102c7494]
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov al, byte [ebx + 3]
cmp al, 3
jne 0x10183e3f
movzx eax, byte [ebx + 4]
add eax, 7
jmp 0x10183e53
cmp al, 4
jne 0x10183e4a
mov eax, 0x16
jmp 0x10183e53
cmp al, 1
jne 0x10183ecd
mov eax, 0xa
cmp dword [edi + 0x438], 0
jne case.0x101833f1.16
cmp eax, 0xa
jbe 0x10183f24
add eax, 0xfffffff6
mov dword [edi + 4], eax
lea eax, [ebx + 0xa]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
cmp dword [eax], 0x10
je case.0x101833f1.16
mov dword [eax], 0x10
lea eax, [ebp - 0x11c]
push eax
push dword [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x13c]
call fcn.10170d40
mov ecx, dword [ebp - 0x11c]
add esp, 0x10
test eax, eax
je 0x10183ef1
cmp eax, 0x51
je 0x10183f19
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push esi
call fcn.10170b90
add esp, 8
mov eax, 0xd
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
push str.SOCKS5_reply_has_wrong_address_type.
push esi
call fcn.10170b90
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
test ecx, ecx
jne 0x10183f19
push str.connection_to_proxy_closed
push esi
call fcn.10170b90
add esp, 8
mov eax, 3
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
cmp ecx, eax
jne 0x101835a4
mov eax, dword [esi + 0xc]
cmp dword [eax], 0x11
je case.0x101833f1.5
mov dword [eax], 0x11
push str.SOCKS5_request_granted.
push esi
call fcn.10170c50
mov eax, dword [ebp - 0x14c]
add esp, 8
mov byte [eax], 1
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.102649e4
mov esp, ebp
pop ebp
ret