Function at 0x42d818
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0x46f008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x130], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x148], eax
mov eax, dword [ebp + 0x10]
push edi
mov ebx, dword [esi + 0xc]
mov edi, dword [esi + 0x904]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp + 0x18]
push 0xf8
mov dword [ebp - 0x160], eax
lea eax, [ebp - 0x114]
push 0
push eax
mov dword [ebp - 0x154], edx
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x164], esi
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x150], edi
mov dword [ebp - 0x11c], 0x6e6b6e75
mov dword [ebp - 0x118], 0x6e776f
call fcn.004520c0
mov eax, dword [ebp - 0x140]
add esp, 0xc
mov edx, dword [ebp - 0x130]
mov eax, dword [ebx + eax*4 + 0x150]
mov dword [ebp - 0x134], eax
lea ecx, [edx + 1]
mov eax, dword [ebx + 0x98]
cmp eax, 5
mov dword [ebp - 0x124], eax
sete byte [ebp - 0x11d]
mov al, byte [edx]
inc edx
test al, al
jne 0x42d8d8
mov eax, dword [esi + 0x174]
sub edx, ecx
xor ecx, ecx
mov dword [ebp - 0x158], edx
and dword [ebp - 0x144], ecx
cmp dword [ebx], 1
mov dword [ebp - 0x138], eax
mov byte [ebp - 0x129], cl
mov dword [ebp - 0x15c], 0x10
jl 0x42d91b
mov eax, dword [ebx]
cmp eax, 0x11
jl 0x42da5b
mov edi, dword [ebp - 0x160]
mov eax, dword [ebx]
cmp byte [edi], cl
mov edi, dword [ebp - 0x150]
jne 0x42da5b
cmp eax, 1
je 0x42da5b
mov dword [ebx], 1
cmp byte [ebx + 0x270], cl
je 0x42d968
push dword [ebp - 0x148]
push dword [ebp - 0x130]
push str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d
push esi
call fcn.0041d632
mov edx, dword [ebp - 0x158]
add esp, 0x10
cmp dword [ebp - 0x124], 5
je 0x42d98f
cmp edx, 0xff
jbe 0x42d98f
push edx
push str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu_
push esi
call fcn.0041d632
add esp, 0xc
mov byte [ebp - 0x11d], 1
mov edx, dword [ebp - 0x138]
test edx, 0xfffffffa
je 0x42d9b2
push edx
push str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__lu
push esi
call fcn.0041d632
mov edx, dword [ebp - 0x138]
add esp, 0xc
push 0
test dl, 1
mov byte [edi], 5
pop eax
cmovne eax, dword [ebp - 0x128]
and edx, 4
push 3
setne byte [ebp - 0x129]
mov dword [ebp - 0x128], eax
mov byte [edi + 2], 0
pop ecx
mov dword [ebp - 0x124], ecx
test edx, 4
je 0x42d9f4
push 4
pop ecx
mov byte [edi + 3], 1
mov dword [ebp - 0x124], ecx
test eax, eax
je 0x42da03
mov byte [ecx + edi], 2
inc ecx
mov dword [ebp - 0x124], ecx
mov edx, dword [ebp - 0x134]
lea eax, [ecx - 2]
mov byte [edi + 1], al
lea eax, [ebp - 0x13c]
push eax
push ecx
push edi
mov ecx, esi
call fcn.0041d87f
add esp, 0xc
test eax, eax
je 0x42da2f
cmp eax, 0x51
jne 0x42dadf
mov edx, dword [ebp - 0x13c]
mov eax, dword [ebp - 0x124]
mov ecx, dword [esi + 0xc]
cmp edx, eax
je 0x42da6c
push 2
pop esi
cmp dword [ecx], esi
je 0x42da4b
mov dword [ecx], esi
sub eax, edx
mov dword [ebx + 4], eax
lea eax, [edx + edi]
mov dword [ebx + 8], eax
jmp 0x42e2bd
dec eax
cmp eax, 0xf
ja case.0x42da65.5
jmp dword [eax*4 + 0x42e2d0]
push 4
pop eax
cmp dword [ecx], eax
je case.0x42da65.3
mov dword [ecx], eax
mov dword [ebx + 4], 2
mov dword [ebx + 8], edi
mov edx, dword [ebx + 8]
lea eax, [ebp - 0x124]
mov ecx, dword [ebp - 0x134]
push eax
push dword [ebx + 4]
call fcn.0041db77
pop ecx
pop ecx
mov ecx, dword [ebp - 0x124]
test eax, eax
je 0x42db12
cmp eax, 0x51
je 0x42db27
push str.Unable_to_receive_initial_SOCKS5_response.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0xf
jmp 0x42daee
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0x13c]
push eax
push dword [ebx + 4]
mov ecx, esi
push dword [ebx + 8]
call fcn.0041d87f
add esp, 0xc
test eax, eax
je 0x42daf4
cmp eax, 0x51
je 0x42daf4
push str.Unable_to_send_initial_SOCKS5_request.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0x1d
pop eax
jmp 0x42e2bf
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0x13c]
cmp ecx, eax
je case.0x42da65.3
sub eax, ecx
add dword [ebx + 8], ecx
mov dword [ebx + 4], eax
jmp 0x42e2bd
test ecx, ecx
jne 0x42db27
push str.Connection_to_proxy_closed
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 3
jmp 0x42daee
mov eax, dword [ebx + 4]
cmp ecx, eax
jne 0x42db05
push 5
pop ecx
cmp byte [edi], cl
je 0x42db46
push str.Received_invalid_version_in_initial_SOCKS5_response.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 2
jmp 0x42daee
mov al, byte [edi + 1]
test al, al
je 0x42ddc3
cmp al, 2
jne 0x42dbbd
mov eax, dword [esi + 0xc]
push 6
pop ecx
cmp dword [eax], ecx
je case.0x42da65.6
mov dword [eax], ecx
mov eax, dword [ebp - 0x128]
test eax, eax
je 0x42dc38
cmp dword [ebp - 0x154], 0
je 0x42dc38
mov edx, eax
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x42db81
sub edx, ecx
mov ecx, dword [ebp - 0x154]
mov dword [ebp - 0x140], edx
lea eax, [ecx + 1]
mov dword [ebp - 0x138], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42db9f
sub ecx, dword [ebp - 0x138]
mov eax, dword [ebp - 0x128]
mov dword [ebp - 0x138], ecx
jmp 0x42dc46
cmp al, 1
jne 0x42dc0c
cmp byte [ebp - 0x129], 0
je 0x42dbf8
mov eax, dword [esi + 0xc]
cmp dword [eax], ecx
je 0x42dbd3
mov dword [eax], ecx
mov ecx, dword [ebp - 0x140]
mov edx, esi
call fcn.00447003
test eax, eax
je 0x42dc24
push str.Unable_to_negotiate_SOCKS5_GSS_API_context.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 4
jmp 0x42daee
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 5
jmp 0x42daee
cmp al, 0xff
jne 0x42dc24
push str.No_authentication_method_was_acceptable.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0xc
jmp 0x42daee
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0x20
jmp 0x42daee
xor edx, edx
and dword [ebp - 0x138], edx
mov dword [ebp - 0x140], edx
mov byte [edi], 1
mov byte [edi + 1], dl
test eax, eax
je 0x42dc84
test edx, edx
je 0x42dc84
cmp edx, 0xff
jb 0x42dc70
push str.Excessive_user_name_length_for_proxy_auth
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0xb
jmp 0x42daee
push edx
push eax
lea eax, [edi + 2]
push eax
call fcn.00452780
mov edx, dword [ebp - 0x140]
add esp, 0xc
mov eax, dword [ebp - 0x138]
lea ecx, [edx + 2]
mov edx, dword [ebp - 0x154]
mov byte [ecx + edi], al
inc ecx
mov dword [ebp - 0x140], ecx
test edx, edx
je 0x42dcda
test eax, eax
je 0x42dcda
cmp eax, 0xff
jbe 0x42dcc0
push str.Excessive_password_length_for_proxy_auth
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0xa
jmp 0x42daee
push eax
push edx
lea eax, [ecx + edi]
push eax
call fcn.00452780
mov eax, dword [ebp - 0x138]
add esp, 0xc
mov ecx, dword [ebp - 0x140]
add ecx, eax
mov eax, dword [esi + 0xc]
push 7
pop edx
cmp dword [eax], edx
je 0x42dce8
mov dword [eax], edx
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edi
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0x13c]
push eax
push dword [ebx + 4]
mov ecx, esi
push dword [ebx + 8]
call fcn.0041d87f
add esp, 0xc
test eax, eax
je 0x42dd28
cmp eax, 0x51
je 0x42dd28
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0x1c
jmp 0x42daee
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0x13c]
cmp eax, ecx
jne 0x42db05
mov dword [ebx + 8], edi
mov dword [ebx + 4], 2
mov eax, dword [esi + 0xc]
push 8
pop ecx
cmp dword [eax], ecx
je case.0x42da65.8
mov dword [eax], ecx
mov edx, dword [ebx + 8]
lea eax, [ebp - 0x124]
mov ecx, dword [ebp - 0x134]
push eax
push dword [ebx + 4]
call fcn.0041db77
pop ecx
pop ecx
mov ecx, dword [ebp - 0x124]
test eax, eax
je 0x42dd8c
cmp eax, 0x51
je 0x42dd94
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0xe
jmp 0x42daee
test ecx, ecx
je 0x42e286
mov eax, dword [ebx + 4]
cmp ecx, eax
jne 0x42db05
mov al, byte [edi + 1]
test al, al
je 0x42ddc3
movzx eax, al
push eax
movzx eax, byte [edi]
push eax
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push esi
call fcn.0041d6ad
add esp, 0x10
push 0x21
jmp 0x42daee
mov eax, dword [esi + 0xc]
push 9
pop ecx
cmp dword [eax], ecx
je case.0x42da65.9
mov dword [eax], ecx
mov al, byte [ebp - 0x11d]
test al, al
je 0x42dfd8
mov edx, dword [ebp - 0x130]
lea eax, [ebp - 0x144]
push eax
push 0
push dword [ebp - 0x148]
mov ecx, esi
call fcn.0042ea06
add esp, 0xc
cmp eax, 0xffffffff
je 0x42df54
mov ecx, dword [esi + 0xc]
cmp eax, 1
jne 0x42de1f
push 0xa
pop eax
cmp dword [ecx], eax
je 0x42e2bd
mov dword [ecx], eax
jmp 0x42e2bd
push 0xb
pop eax
cmp dword [ecx], eax
je 0x42de6d
mov dword [ecx], eax
jmp 0x42de6d
push dword [ebp - 0x148]
mov edx, dword [ebp - 0x130]
mov ecx, esi
call fcn.0042e579
mov dword [ebp - 0x144], eax
pop ecx
test eax, eax
je 0x42df2f
push dword [ebp - 0x130]
mov dword [esi + 0x9cc], eax
push str.SOCKS5:_hostname__s_found
push esi
mov byte [esi + 0x9e0], 1
call fcn.0041d632
add esp, 0xc
mov eax, dword [ebp - 0x144]
test eax, eax
je case.0x42da65.11
mov eax, dword [eax]
mov dword [ebp - 0x150], eax
test eax, eax
je case.0x42da65.11
push pe_nt_image_headers32
lea edx, [ebp - 0x11c]
mov ecx, eax
call fcn.0042e310
pop ecx
lea ecx, [ebp - 0x11c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42dea7
push dword [ebp - 0x148]
sub ecx, edx
mov eax, pe_nt_image_headers32
sub eax, ecx
push 0x466790
push eax
lea eax, [ebp - 0x11c]
add eax, ecx
push eax
call fcn.0041201d
add esp, 0x10
mov word [edi], 0x105
mov byte [edi + 2], 0
push 3
pop eax
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x150]
cmp dword [eax + 4], 2
jne 0x42df5b
push 8
mov byte [edi + 3], 1
lea ecx, [edi + 4]
mov edx, dword [eax + 0x18]
pop eax
push 4
sub edx, edi
mov dword [ebp - 0x128], eax
pop ebx
mov al, byte [edx + ecx]
mov byte [ecx], al
inc ecx
sub ebx, 1
jne 0x42df0a
lea eax, [ebp - 0x11c]
push eax
push str.SOCKS5_connect_to_IPv4__s__locally_resolved_
push esi
call fcn.0041d632
mov ebx, dword [ebp - 0x14c]
jmp 0x42dfa7
lea edx, [ebp - 0x144]
mov ecx, esi
call fcn.0042f147
mov ecx, eax
mov eax, dword [ebp - 0x144]
test eax, eax
jne 0x42de7b
test ecx, ecx
je 0x42e2bd
push 0x1b
jmp 0x42daee
cmp dword [eax + 4], 0x17
jne 0x42df95
mov byte [edi + 3], 4
xor ecx, ecx
mov edx, dword [eax + 0x18]
push 0x14
pop eax
mov dword [ebp - 0x128], eax
mov al, byte [edx + ecx + 8]
mov byte [ecx + edi + 4], al
inc ecx
cmp ecx, 0x10
jl 0x42df73
lea eax, [ebp - 0x11c]
push eax
push str.SOCKS5_connect_to_IPv6__s__locally_resolved_
push esi
call fcn.0041d632
jmp 0x42dfa7
lea eax, [ebp - 0x11c]
push eax
push str.SOCKS5_connection_to__s_not_supported
push esi
call fcn.0041d6ad
mov edx, dword [ebp - 0x144]
add esp, 0xc
mov ecx, esi
call fcn.0042ec6b
jmp 0x42e0a6
push dword [ebp - 0x130]
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push esi
call fcn.0041d6ad
add esp, 0xc
jmp 0x42df54
mov al, byte [ebp - 0x11d]
mov word [edi], 0x105
mov byte [edi + 2], 0
push 3
pop ecx
test al, al
jne case.0x42da65.13
cmp byte [ebx + 0x27b], al
je 0x42e032
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp - 0x130]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x42e013
xor eax, eax
inc eax
jmp 0x42e2bf
mov byte [edi + 3], 4
lea esi, [ebp - 0x18]
add edi, 4
push 0x14
pop eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x164]
mov edi, dword [ebp - 0x150]
jmp 0x42e086
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 0x130]
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x42e05d
mov byte [edi + 3], al
mov eax, dword [ebp - 0x14c]
push 8
mov dword [edi + 4], eax
pop eax
jmp 0x42e086
mov eax, dword [ebp - 0x158]
push eax
push dword [ebp - 0x130]
mov byte [edi + 3], 3
mov byte [edi + 4], al
lea eax, [edi + 5]
push eax
call fcn.00452780
mov eax, dword [ebp - 0x158]
add esp, 0xc
add eax, 5
push dword [ebp - 0x148]
mov dword [ebp - 0x128], eax
push dword [ebp - 0x130]
push str.SOCKS5_connect_to__s:_d__remotely_resolved_
push esi
call fcn.0041d632
add esp, 0x10
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp - 0x148]
mov eax, edx
sar eax, 8
mov byte [ecx + edi], al
mov byte [ecx + edi + 1], dl
cmp dword [ebx + 0x518], 0
jne 0x42e130
lea eax, [ecx + 2]
mov dword [ebx + 8], edi
mov dword [ebx + 4], eax
mov eax, dword [esi + 0xc]
push 0xe
pop ecx
cmp dword [eax], ecx
je case.0x42da65.14
mov dword [eax], ecx
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0x13c]
push eax
push dword [ebx + 4]
mov ecx, esi
push dword [ebx + 8]
call fcn.0041d87f
add esp, 0xc
test eax, eax
je 0x42e116
cmp eax, 0x51
je 0x42e116
push str.Failed_to_send_SOCKS5_connect_request.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 0x1e
jmp 0x42daee
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0x13c]
cmp eax, ecx
jne 0x42db05
cmp dword [ebx + 0x518], 0
je 0x42e144
push str.SOCKS5_GSS_API_protection_not_yet_implemented.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
push 6
jmp 0x42daee
mov dword [ebx + 4], 0xa
mov dword [ebx + 8], edi
mov eax, dword [esi + 0xc]
push 0xf
pop ecx
cmp dword [eax], ecx
je case.0x42da65.15
mov dword [eax], ecx
mov edx, dword [ebx + 8]
lea eax, [ebp - 0x124]
mov ecx, dword [ebp - 0x134]
push eax
push dword [ebx + 4]
call fcn.0041db77
pop ecx
pop ecx
mov ecx, dword [ebp - 0x124]
test eax, eax
je 0x42e188
cmp eax, 0x51
je 0x42e190
jmp 0x42e25b
test ecx, ecx
je 0x42e286
mov eax, dword [ebx + 4]
cmp ecx, eax
jne 0x42db05
cmp byte [edi], 5
je 0x42e1aa
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x42db3a
mov al, byte [edi + 1]
test al, al
je 0x42e1df
push 0x19
pop ebx
movzx edi, al
push edi
push dword [ebp - 0x130]
push str.Cant_complete_SOCKS5_connection_to__s.___d_
push esi
call fcn.0041d6ad
add esp, 0x10
cmp edi, 9
jae 0x42e1d8
mov ebx, dword [edi*4 + 0x466978]
mov eax, ebx
jmp 0x42e2bf
mov al, byte [edi + 3]
cmp al, 3
jne 0x42e1ef
movzx eax, byte [edi + 4]
add eax, 7
jmp 0x42e1fe
cmp al, 4
jne 0x42e1f7
push 0x16
jmp 0x42e1fd
cmp al, 1
jne 0x42e270
push 0xa
pop eax
cmp dword [ebx + 0x518], 0
jne case.0x42da65.16
cmp eax, 0xa
jbe 0x42e29b
add eax, 0xfffffff6
mov dword [ebx + 4], eax
lea eax, [edi + 0xa]
mov dword [ebx + 8], eax
mov eax, dword [esi + 0xc]
push 0x10
pop ecx
cmp dword [eax], ecx
je case.0x42da65.16
mov dword [eax], ecx
mov edx, dword [ebx + 8]
lea eax, [ebp - 0x124]
mov ecx, dword [ebp - 0x134]
push eax
push dword [ebx + 4]
call fcn.0041db77
pop ecx
pop ecx
mov ecx, dword [ebp - 0x124]
test eax, eax
je 0x42e282
cmp eax, 0x51
je 0x42e290
mov dword [ebp - 0x15c], 0xd
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push esi
call fcn.0041d6ad
mov eax, dword [ebp - 0x15c]
pop ecx
pop ecx
jmp 0x42e2bf
push str.SOCKS5_reply_has_wrong_address_type.
push esi
call fcn.0041d6ad
pop ecx
pop ecx
jmp 0x42e00b
test ecx, ecx
jne 0x42e290
push str.connection_to_proxy_closed
jmp 0x42db1b
mov eax, dword [ebx + 4]
cmp ecx, eax
jne 0x42db05
mov eax, dword [esi + 0xc]
push 0x11
pop ecx
cmp dword [eax], ecx
je case.0x42da65.5
mov dword [eax], ecx
push str.SOCKS5_request_granted.
push esi
call fcn.0041d632
mov eax, dword [ebp - 0x160]
pop ecx
pop ecx
mov byte [eax], 1
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00450ca6
leave
ret