Function at 0x4a3770
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x148
mov eax, dword [0x7000a8]
xor eax, esp
mov dword [esp + 0x144], eax
mov eax, dword [esp + 0x14c]
push ebx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x154]
push ebp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x15c]
push esi
mov esi, dword [esp + 0x168]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x164]
push edi
mov edi, dword [esp + 0x170]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x174]
push 0xf8
mov ebx, dword [edi + 0xc]
mov ebp, dword [edi + 0x88c]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x60]
push 0
push eax
mov dword [esp + 0x60], 0x6e6b6e75
mov dword [esp + 0x64], 0x6e776f
call fcn.004b9340
mov eax, dword [ebx + esi*4 + 0x130]
add esp, 0xc
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov al, byte [ebx + 0x90]
cmp al, 5
mov byte [esp + 0x1b], al
lea ecx, [edx + 1]
sete byte [esp + 0x1a]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x4a3820
mov eax, dword [edi + 0x170]
sub edx, ecx
xor ecx, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
xor esi, esi
mov eax, dword [ebx]
mov dword [esp + 0x3c], edx
cmp eax, 1
jl 0x4a3853
mov dword [esp + 0x10], eax
cmp eax, 0x11
jl 0x4a3961
mov edx, dword [esp + 0x40]
mov dword [esp + 0x10], eax
cmp byte [edx], cl
mov edx, dword [esp + 0x3c]
jne 0x4a3961
mov dword [esp + 0x10], eax
cmp eax, 1
je 0x4a3961
mov dword [ebx], 1
cmp byte [ebx + 0x240], cl
je 0x4a389c
push dword [esp + 0x2c]
push dword [esp + 0x20]
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d
push edi
call fcn.00492920
mov edx, dword [esp + 0x4c]
add esp, 0x10
cmp byte [esp + 0x1b], 5
je 0x4a38bf
cmp edx, 0xff
jbe 0x4a38bf
push edx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu_
push edi
call fcn.00492920
add esp, 0xc
mov byte [esp + 0x1a], 1
mov eax, dword [esp + 0x24]
test eax, 0xfffffffa
je 0x4a38dd
push eax
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu
push edi
call fcn.00492920
mov eax, dword [esp + 0x30]
add esp, 0xc
test al, 1
mov byte [ebp], 5
mov eax, esi
mov byte [ebp + 2], 0
cmovne eax, dword [esp + 0x38]
mov ecx, 3
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], ecx
test eax, eax
je 0x4a390c
mov ecx, 4
mov byte [ebp + 3], 2
mov dword [esp + 0x24], ecx
mov esi, dword [esp + 0x20]
lea eax, [ecx - 2]
mov byte [ebp + 1], al
lea eax, [esp + 0x14]
push eax
push ecx
push ebp
push esi
push edi
call fcn.00492df0
add esp, 0x14
test eax, eax
je 0x4a3930
cmp eax, 0x51
jne 0x4a39af
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov ecx, dword [edi + 0xc]
cmp edx, eax
je 0x4a3976
cmp dword [ecx], 2
je 0x4a394e
mov dword [ecx], 2
mov edx, dword [esp + 0x14]
sub eax, edx
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x14]
add eax, ebp
mov dword [ebx + 8], eax
jmp 0x4a419e
mov eax, dword [esp + 0x10]
dec eax
cmp eax, 0xf
ja case.0x4a396f.5
jmp dword [eax*4 + 0x4a41bc]
cmp dword [ecx], 4
je 0x4a39e7
mov dword [ecx], 4
mov dword [ebx + 4], 2
mov dword [ebx + 8], ebp
jmp 0x4a39f7
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push esi
push edi
call fcn.00492df0
add esp, 0x14
test eax, eax
je 0x4a39c7
cmp eax, 0x51
je 0x4a39c7
push str.Unable_to_send_initial_SOCKS5_request.
push edi
call fcn.00492850
add esp, 8
mov eax, 0x1d
jmp 0x4a41a0
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
je 0x4a39e7
sub eax, ecx
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x14]
add dword [ebx + 8], eax
jmp 0x4a419e
mov esi, dword [esp + 0x20]
mov dword [ebx + 4], 2
mov dword [ebx + 8], ebp
jmp 0x4a39f7
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push esi
call fcn.00492a20
mov ecx, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x4a3a30
cmp eax, 0x51
je 0x4a3a4c
push str.Unable_to_receive_initial_SOCKS5_response.
push edi
call fcn.00492850
add esp, 8
mov eax, 0xf
jmp 0x4a41a0
test ecx, ecx
jne 0x4a3a4c
push str.Connection_to_proxy_closed
push edi
call fcn.00492850
add esp, 8
mov eax, 3
jmp 0x4a41a0
mov eax, dword [ebx + 4]
cmp ecx, eax
je 0x4a3a64
sub eax, ecx
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x10]
add dword [ebx + 8], eax
jmp 0x4a419e
cmp byte [ebp], 5
je 0x4a3a82
push str.Received_invalid_version_in_initial_SOCKS5_response.
push edi
call fcn.00492850
add esp, 8
mov eax, 2
jmp 0x4a41a0
mov al, byte [ebp + 1]
test al, al
je 0x4a3cda
cmp al, 2
jne 0x4a3aef
mov eax, dword [edi + 0xc]
cmp dword [eax], 6
je case.0x4a396f.6
mov dword [eax], 6
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4a3b3f
mov esi, dword [esp + 0x30]
test esi, esi
je 0x4a3b3f
mov edx, eax
lea ecx, [edx + 1]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x4a3ac0
sub edx, ecx
mov ecx, esi
mov dword [esp + 0x34], edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a3ad2
mov eax, dword [esp + 0x38]
sub ecx, esi
mov dword [esp + 0x24], ecx
mov byte [ebp], 1
mov byte [ebp + 1], dl
jmp 0x4a3b6f
cmp al, 1
jne 0x4a3b0b
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
push edi
call fcn.00492850
add esp, 8
mov eax, 5
jmp 0x4a41a0
cmp al, 0xff
jne 0x4a3b27
push str.No_authentication_method_was_acceptable.
push edi
call fcn.00492850
add esp, 8
mov eax, 0xc
jmp 0x4a41a0
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push edi
call fcn.00492850
add esp, 8
mov eax, 0x20
jmp 0x4a41a0
mov dword [esp + 0x34], 0
xor edx, edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x34], 0
mov word [ebp], 1
mov dword [esp + 0x24], 0
mov dword [esp + 0x34], edx
test eax, eax
je 0x4a3ba5
test edx, edx
je 0x4a3ba5
cmp edx, 0xff
jb 0x4a3b93
push str.Excessive_user_name_length_for_proxy_auth
push edi
call fcn.00492850
add esp, 8
mov eax, 0xb
jmp 0x4a41a0
push edx
push eax
lea eax, [ebp + 2]
push eax
call fcn.004b94a0
mov edx, dword [esp + 0x40]
add esp, 0xc
mov eax, dword [esp + 0x24]
lea esi, [edx + 2]
mov ecx, dword [esp + 0x30]
mov byte [esi + ebp], al
inc esi
test ecx, ecx
je 0x4a3bed
test eax, eax
je 0x4a3bed
cmp eax, 0xff
jbe 0x4a3bdb
push str.Excessive_password_length_for_proxy_auth
push edi
call fcn.00492850
add esp, 8
mov eax, 0xa
jmp 0x4a41a0
push eax
push ecx
lea eax, [esi + ebp]
push eax
call fcn.004b94a0
mov eax, dword [esp + 0x30]
add esp, 0xc
add esi, eax
mov eax, dword [edi + 0xc]
cmp dword [eax], 7
je 0x4a3bfd
mov dword [eax], 7
mov dword [ebx + 4], esi
mov dword [ebx + 8], ebp
lea eax, [esp + 0x14]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push dword [esp + 0x2c]
push edi
call fcn.00492df0
add esp, 0x14
test eax, eax
je 0x4a3c3c
cmp eax, 0x51
je 0x4a3c3c
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push edi
call fcn.00492850
add esp, 8
mov eax, 0x1c
jmp 0x4a41a0
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jne 0x4a39d2
mov dword [ebx + 8], ebp
mov dword [ebx + 4], 2
mov eax, dword [edi + 0xc]
cmp dword [eax], 8
je case.0x4a396f.8
mov dword [eax], 8
lea eax, [esp + 0x10]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push dword [esp + 0x2c]
call fcn.00492a20
mov ecx, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x4a3c9f
cmp eax, 0x51
je 0x4a3ca7
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push edi
call fcn.00492850
add esp, 8
mov eax, 0xe
jmp 0x4a41a0
test ecx, ecx
je 0x4a415b
mov eax, dword [ebx + 4]
cmp ecx, eax
jne 0x4a3a53
mov al, byte [ebp + 1]
test al, al
je 0x4a3cda
movzx eax, al
push eax
movzx eax, byte [ebp]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push edi
call fcn.00492850
add esp, 0x10
mov eax, 0x21
jmp 0x4a41a0
mov eax, dword [edi + 0xc]
cmp dword [eax], 9
je case.0x4a396f.9
mov dword [eax], 9
cmp byte [esp + 0x1a], 0
je 0x4a3d3e
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
push 0
push dword [esp + 0x34]
push esi
push edi
call fcn.0049be10
add esp, 0x14
cmp eax, 0xffffffff
je 0x4a3eea
mov ecx, dword [edi + 0xc]
cmp eax, 1
jne 0x4a3d2d
cmp dword [ecx], 0xa
je 0x4a419e
mov dword [ecx], 0xa
jmp 0x4a419e
cmp dword [ecx], 0xb
je 0x4a3d38
mov dword [ecx], 0xb
mov ecx, dword [esp + 0x28]
jmp 0x4a3db1
mov word [ebp], 0x105
mov byte [ebp + 2], 0
jmp 0x4a3f0d
push dword [esp + 0x2c]
mov esi, dword [esp + 0x20]
push esi
push edi
call fcn.0049b680
add esp, 0xc
mov dword [esp + 0x28], eax
test eax, eax
je 0x4a3d8b
push esi
push str.SOCKS5:_hostname__s_found
push edi
mov dword [edi + 0x970], eax
mov byte [edi + 0x984], 1
call fcn.00492920
mov ecx, dword [esp + 0x34]
add esp, 0xc
test ecx, ecx
jne 0x4a3db9
lea eax, [esp + 0x28]
push eax
push edi
call fcn.0049c280
mov ecx, dword [esp + 0x30]
add esp, 8
test ecx, ecx
jne 0x4a3db9
neg eax
sbb eax, eax
and eax, 0x1b
jmp 0x4a41a0
mov esi, dword [esp + 0x1c]
test ecx, ecx
je 0x4a3edb
mov eax, dword [ecx]
mov dword [esp + 0x30], eax
test eax, eax
je 0x4a3edb
push 0x100
lea ecx, [esp + 0x58]
push ecx
push eax
call fcn.0049bdc0
lea ecx, [esp + 0x60]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a3de1
push dword [esp + 0x2c]
sub ecx, edx
mov eax, 0x100
sub eax, ecx
push 0x66671c
push eax
lea eax, [esp + 0x60]
add eax, ecx
push eax
call fcn.004a43c0
mov eax, dword [esp + 0x40]
add esp, 0x10
mov word [ebp], 0x105
mov esi, 3
mov byte [ebp + 2], 0
mov ecx, dword [eax + 4]
cmp ecx, 2
jne 0x4a3e72
mov byte [ebp + 3], 1
mov esi, 8
mov ecx, dword [eax + 0x18]
movzx eax, byte [ecx + 4]
mov byte [ebp + 4], al
movzx eax, byte [ecx + 5]
mov byte [ebp + 5], al
movzx eax, byte [ecx + 6]
mov byte [ebp + 6], al
movzx eax, byte [ecx + 7]
mov byte [ebp + 7], al
lea eax, [esp + 0x54]
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved_
push edi
call fcn.00492920
add esp, 0xc
push dword [esp + 0x28]
push edi
call fcn.0049c310
add esp, 8
jmp case.0x4a396f.13
cmp ecx, 0x17
jne 0x4a3eb6
xor ecx, ecx
mov byte [ebp + 3], 4
mov edx, dword [eax + 0x18]
lea esi, [ecx + 0x14]
mov al, byte [edx + ecx + 8]
mov byte [ecx + ebp + 4], al
inc ecx
cmp ecx, 0x10
jl 0x4a3e83
lea eax, [esp + 0x54]
push eax
push str.SOCKS5_connect_to_IPv6__s__locally_resolved_
push edi
call fcn.00492920
add esp, 0xc
push dword [esp + 0x28]
push edi
call fcn.0049c310
add esp, 8
jmp case.0x4a396f.13
lea eax, [esp + 0x54]
push eax
push str.SOCKS5_connection_to__s_not_supported
push edi
call fcn.00492850
add esp, 0xc
push dword [esp + 0x28]
push edi
call fcn.0049c310
add esp, 8
jmp case.0x4a396f.13
push esi
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push edi
call fcn.00492850
add esp, 0xc
mov eax, 0x1b
jmp 0x4a41a0
cmp byte [esp + 0x1b], 5
mov esi, 3
mov word [ebp], 0x105
mov byte [ebp + 2], cl
je case.0x4a396f.13
cmp byte [ebx + 0x24b], 0
je 0x4a3f42
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x20]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x4a4150
movups xmm0, xmmword [esp + 0x44]
mov byte [ebp + 3], 4
lea esi, [eax + 0x13]
movups xmmword [ebp + 4], xmm0
jmp 0x4a3f8a
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x4a3f6a
mov byte [ebp + 3], al
mov esi, 8
mov eax, dword [esp + 0x30]
mov dword [ebp + 4], eax
jmp 0x4a3f8a
mov eax, dword [esp + 0x3c]
push eax
mov byte [ebp + 3], 3
mov byte [ebp + 4], al
lea eax, [ebp + 5]
push esi
push eax
call fcn.004b94a0
mov esi, dword [esp + 0x48]
add esp, 0xc
add esi, 5
push dword [esp + 0x2c]
push dword [esp + 0x20]
push str.SOCKS5_connect_to__s:_d__remotely_resolved_
push edi
call fcn.00492920
add esp, 0x10
mov ecx, dword [esp + 0x2c]
mov eax, ecx
sar eax, 8
mov byte [esi + ebp], al
lea eax, [esi + 2]
mov byte [esi + ebp + 1], cl
mov dword [ebx + 8], ebp
mov dword [ebx + 4], eax
mov eax, dword [edi + 0xc]
cmp dword [eax], 0xe
je case.0x4a396f.14
mov dword [eax], 0xe
lea eax, [esp + 0x14]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push dword [esp + 0x2c]
push edi
call fcn.00492df0
add esp, 0x14
test eax, eax
je 0x4a4000
cmp eax, 0x51
je 0x4a4000
push str.Failed_to_send_SOCKS5_connect_request.
push edi
call fcn.00492850
add esp, 8
mov eax, 0x1e
jmp 0x4a41a0
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jne 0x4a39d2
mov dword [ebx + 4], 0xa
mov dword [ebx + 8], ebp
mov eax, dword [edi + 0xc]
cmp dword [eax], 0xf
je case.0x4a396f.15
mov dword [eax], 0xf
lea eax, [esp + 0x10]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push dword [esp + 0x2c]
call fcn.00492a20
mov ecx, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x4a4063
cmp eax, 0x51
je 0x4a406b
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push edi
call fcn.00492850
add esp, 8
mov eax, 0x10
jmp 0x4a41a0
test ecx, ecx
je 0x4a415b
mov eax, dword [ebx + 4]
cmp ecx, eax
jne 0x4a3a53
cmp byte [ebp], 5
je 0x4a4094
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push edi
call fcn.00492850
add esp, 8
mov eax, 2
jmp 0x4a41a0
mov al, byte [ebp + 1]
test al, al
je 0x4a40c9
movzx esi, al
mov ebx, 0x19
push esi
push dword [esp + 0x20]
push str.Cant_complete_SOCKS5_connection_to__s.___d_
push edi
call fcn.00492850
add esp, 0x10
cmp esi, 9
jae 0x4a40c2
mov ebx, dword [esi*4 + 0x665fd8]
mov eax, ebx
jmp 0x4a41a0
mov al, byte [ebp + 3]
cmp al, 3
jne 0x4a40e2
movzx eax, byte [ebp + 4]
add eax, 7
cmp eax, 0xa
jbe 0x4a417b
jmp 0x4a40eb
cmp al, 4
jne 0x4a413e
mov eax, 0x16
add eax, 0xfffffff6
mov dword [ebx + 4], eax
lea eax, [ebp + 0xa]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
cmp dword [eax], 0x10
je case.0x4a396f.16
mov dword [eax], 0x10
lea eax, [esp + 0x10]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push dword [esp + 0x2c]
call fcn.00492a20
mov ecx, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x4a4157
cmp eax, 0x51
je 0x4a4170
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push edi
call fcn.00492850
add esp, 8
mov eax, 0xd
jmp 0x4a41a0
cmp al, 1
je 0x4a417b
push str.SOCKS5_reply_has_wrong_address_type.
push edi
call fcn.00492850
add esp, 8
mov eax, 1
jmp 0x4a41a0
test ecx, ecx
jne 0x4a4170
push str.connection_to_proxy_closed
push edi
call fcn.00492850
add esp, 8
mov eax, 3
jmp 0x4a41a0
mov eax, dword [ebx + 4]
cmp ecx, eax
jne 0x4a3a53
mov eax, dword [edi + 0xc]
cmp dword [eax], 0x11
je case.0x4a396f.5
mov dword [eax], 0x11
push str.SOCKS5_request_granted.
push edi
call fcn.00492920
mov eax, dword [esp + 0x48]
add esp, 8
mov byte [eax], 1
xor eax, eax
mov ecx, dword [esp + 0x154]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b75b2
add esp, 0x148
ret