Function at 0x42f9c8
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x4931e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ebx, edx
mov dword [ebp - 0x160], ecx
xor edx, edx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x168], ecx
mov esi, dword [edi]
mov ecx, esi
mov eax, dword [edi + eax*4 + 0x130]
push 1
mov dword [ebp - 0x170], ebx
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x164], eax
call fcn.00426cd7
pop ecx
test eax, eax
jns 0x42fa34
push str.Connection_time_out
push esi
call fcn.00428799
pop ecx
pop ecx
push 0x1c
jmp 0x42fe28
and dword [ebp - 0x15c], 0
lea eax, [ebp - 0x15c]
push eax
push 0x8004667e
push dword [ebp - 0x164]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [ebp + 8]
mov eax, ecx
sar eax, 8
cmp dword [ebp - 0x168], 0
mov word [ebp - 0x118], 0x104
mov byte [ebp - 0x116], al
mov byte [ebp - 0x115], cl
jne 0x42fb47
lea eax, [ebp - 0x15c]
mov edx, ebx
push eax
push ecx
mov ecx, edi
call fcn.00427e28
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x42fa9c
push 5
jmp 0x42fe28
cmp eax, 1
jne 0x42faae
lea edx, [ebp - 0x15c]
mov ecx, edi
call fcn.004284ac
mov eax, dword [ebp - 0x15c]
test eax, eax
je 0x42fb31
mov edi, dword [eax]
test edi, edi
je 0x42fb31
push 0x40
lea edx, [ebp - 0x158]
mov ecx, edi
call fcn.00427be3
pop ecx
lea eax, [ebp - 6]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xa]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x158]
push str._hu._hu._hu._hu
push eax
call dword [sym.imp.MSVCR120.dll_sscanf]
add esp, 0x18
cmp eax, 4
jne 0x42fb1e
mov al, byte [ebp - 0xc]
mov byte [ebp - 0x114], al
mov al, byte [ebp - 0xa]
mov byte [ebp - 0x113], al
mov al, byte [ebp - 8]
mov byte [ebp - 0x112], al
mov al, byte [ebp - 6]
mov byte [ebp - 0x111], al
jmp 0x42fb20
xor edi, edi
mov edx, dword [ebp - 0x15c]
mov ecx, esi
call fcn.00427f87
test edi, edi
jne 0x42fb47
push ebx
push str.Failed_to_resolve___s__for_SOCKS4_connect.
push esi
call fcn.00428799
add esp, 0xc
push 6
jmp 0x42fe28
mov eax, dword [ebp - 0x160]
mov byte [ebp - 0x110], 0
test eax, eax
je 0x42fb67
push ecx
mov edx, eax
lea ecx, [ebp - 0x110]
call fcn.00438506
pop ecx
lea ecx, [ebp - 0x110]
xor edi, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42fb72
sub ecx, edx
cmp dword [ebp - 0x168], edi
je 0x42fbc9
mov edx, ebx
mov dword [ebp - 0x114], 0x1000000
lea edi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x42fb92
sub edx, edi
lea edi, [edx + 1]
lea eax, [edi + 9]
add eax, ecx
cmp eax, 0x106
jg 0x42fbc7
mov edx, ebx
lea ebx, [ebp + ecx - 0x10f]
sub ebx, edx
mov al, byte [edx]
mov byte [ebx + edx], al
inc edx
test al, al
jne 0x42fbb5
mov ebx, dword [ebp - 0x170]
jmp 0x42fbc9
xor edi, edi
mov edx, dword [ebp - 0x164]
lea eax, [ecx + 9]
add eax, edi
lea ecx, [ebp - 0x15c]
push ecx
mov ecx, dword [ebp - 0x16c]
push eax
mov dword [ebp - 0x160], eax
lea eax, [ebp - 0x118]
push eax
call fcn.004289b6
add esp, 0xc
test eax, eax
jne 0x42fe19
mov eax, dword [ebp - 0x160]
cmp dword [ebp - 0x15c], eax
jne 0x42fe19
cmp dword [ebp - 0x168], 0
je 0x42fc60
test edi, edi
jne 0x42fc60
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42fc23
sub ecx, edx
lea eax, [ebp - 0x15c]
mov edx, dword [ebp - 0x164]
push eax
lea edi, [ecx + 1]
mov ecx, dword [ebp - 0x16c]
push edi
push ebx
call fcn.004289b6
add esp, 0xc
test eax, eax
jne 0x42fe19
cmp dword [ebp - 0x15c], edi
jne 0x42fe19
mov edi, dword [ebp - 0x164]
lea eax, [ebp - 0x160]
mov ecx, dword [ebp - 0x16c]
mov edx, edi
push eax
lea eax, [ebp - 0x118]
push 8
push eax
call fcn.0042f92e
add esp, 0xc
test eax, eax
jne 0x42fe12
cmp dword [ebp - 0x160], 8
jne 0x42fe12
cmp byte [ebp - 0x118], al
je 0x42fcad
push str.SOCKS4_reply_has_wrong_version__version_should_be_4.
jmp 0x42fe1e
movzx ecx, byte [ebp - 0x117]
mov eax, ecx
sub eax, 0x5a
je 0x42fdce
dec eax
je 0x42fd8e
dec eax
je 0x42fd4e
dec eax
movzx eax, byte [ebp - 0x10f]
je 0x42fd18
push ecx
movzx ecx, byte [ebp - 0x110]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___Unknown.
push esi
call fcn.00428799
add esp, 0x20
jmp 0x42fe26
movzx ecx, byte [ebp - 0x110]
push 0x5d
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_the_client_program_and_identd_report_different_user_ids.
jmp 0x42fd0a
movzx ecx, byte [ebp - 0x110]
movzx eax, byte [ebp - 0x10f]
push 0x5c
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_SOCKS_server_cannot_connect_to_identd_on_the_client.
jmp 0x42fd0a
movzx ecx, byte [ebp - 0x110]
movzx eax, byte [ebp - 0x10f]
push 0x5b
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x111]
push ecx
push eax
movzx eax, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x113]
push eax
movzx eax, byte [ebp - 0x114]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_or_failed.
jmp 0x42fd0a
cmp dword [ebp - 0x168], 0
mov ecx, 0x482b01
mov eax, 0x48668c
cmove eax, ecx
push eax
push str.SOCKS4_s_request_granted._n
push esi
call fcn.00428725
add esp, 0xc
mov dword [ebp - 0x160], 1
lea eax, [ebp - 0x160]
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x42fe29
push str.Failed_to_receive_SOCKS4_connect_request_ack.
jmp 0x42fe1e
push str.Failed_to_send_SOCKS4_connect_request.
push esi
call fcn.00428799
pop ecx
pop ecx
push 7
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047259d
mov esp, ebp
pop ebp
ret