Function at 0x42d790
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x16c
mov eax, dword [0x46e074]
xor eax, esp
mov dword [esp + 0x168], eax
mov eax, dword [esp + 0x170]
xor edx, edx
cmp dword [ebx + 0xd8], 6
push ebp
sete dl
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x17c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebx + eax*4 + 0x1a0]
push esi
push edi
mov dword [esp + 0x1c], edx
mov edx, dword [ebx]
mov eax, dword [edx + 0x1e0]
mov dword [esp + 0x20], ecx
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x10], edx
mov ebp, 0x493e0
test eax, eax
jle 0x42d7f4
lea ecx, [edi + 1]
mov edx, dword [edx + 0x1e4]
test edx, edx
jle 0x42d801
or ecx, 2
sub ecx, 1
je 0x42d816
sub ecx, 1
je 0x42d814
sub ecx, 1
jne 0x42d81b
cmp eax, edx
jl 0x42d816
mov eax, edx
cdq
mov edi, edx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov eax, dword [esp + 0x10]
mov esi, edx
shr esi, 6
mov edx, esi
imul edx, edx, 0x3e8
sub ecx, edx
mov edx, dword [eax + 0x614]
imul ecx, ecx, 0x3e8
mov eax, ecx
push 0xffffffffffffffff
sub eax, edx
cdq
push 0xfffffc18
push edx
push eax
call fcn.00449630
mov ecx, eax
mov eax, edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, esi
sub eax, dword [edx + 0x610]
imul eax, eax, 0x3e8
cdq
sub ecx, eax
mov eax, dword [esp + 0x14]
sbb eax, edx
add ebp, ecx
adc edi, eax
mov eax, ebp
or eax, edi
je 0x42d893
test edi, edi
jg 0x42d8ab
jl 0x42d893
test ebp, ebp
jae 0x42d8ab
mov eax, dword [esp + 0x10]
push str.Connection_time_out
call fcn.00414140
mov eax, 0x1c
jmp 0x42db83
cmp dword [ebx + 0x280], 0
je 0x42d8e4
cmp dword [esp + 0x1c], 0
mov eax, 0x466e10
jne 0x42d8c5
mov eax, 0x461377
mov ecx, dword [esp + 0x180]
mov esi, dword [esp + 0x24]
push ecx
mov ecx, dword [ebx]
push esi
push eax
push str.SOCKS4_s:_connecting_to_HTTP_proxy__s_port__d_n
call fcn.004140b0
add esp, 0x10
jmp 0x42d8e8
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esp + 0x180]
push ecx
mov ecx, dword [esp + 0x14]
push esi
push str.SOCKS4_communication_to__s:_d_n
call fcn.004140b0
mov eax, dword [esp + 0x18c]
mov edx, eax
sar edx, 8
add esp, 0xc
cmp dword [esp + 0x1c], 0
mov byte [esp + 0x28], 4
mov byte [esp + 0x29], 1
mov byte [esp + 0x2a], dl
mov byte [esp + 0x2b], al
jne 0x42da60
lea ecx, [esp + 0x14]
push ecx
push eax
push esi
push ebx
call fcn.004204b0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x42d97a
mov eax, 5
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.004453f2
add esp, 0x16c
ret
cmp eax, 1
jne 0x42d98e
lea edx, [esp + 0x14]
push edx
mov edi, ebx
call fcn.00420e10
add esp, 4
mov edi, dword [esp + 0x14]
test edi, edi
je 0x42da31
mov ebp, dword [edi]
test ebp, ebp
je 0x42da31
mov eax, dword [ebp + 4]
sub eax, 2
jne 0x42d9c4
mov eax, dword [ebp + 0x18]
add eax, 4
push 0x40
push eax
lea esi, [esp + 0x138]
call fcn.0043eab0
add esp, 8
cmp dword [ebp + 4], 2
jne 0x42da05
mov eax, dword [ebp + 0x18]
movzx ecx, byte [eax + 4]
mov byte [esp + 0x2c], cl
movzx edx, byte [eax + 5]
mov byte [esp + 0x2d], dl
movzx ecx, byte [eax + 6]
mov byte [esp + 0x2e], cl
movzx edx, byte [eax + 7]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x130]
push eax
push str.SOCKS4_connect_to_IPv4__s__locally_resolved__n
mov byte [esp + 0x37], dl
call fcn.004140b0
jmp 0x42da1d
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x130]
push ecx
push str.SOCKS4_connection_to__s_not_supported_n
xor ebp, ebp
call fcn.00414140
mov esi, dword [esp + 0x18]
add esp, 8
call fcn.00420630
mov esi, dword [esp + 0x24]
test ebp, ebp
jne 0x42da60
mov eax, dword [esp + 0x10]
push esi
push str.Failed_to_resolve___s__for_SOCKS4_connect.
call fcn.00414140
add esp, 8
mov eax, 6
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.004453f2
add esp, 0x16c
ret
mov edx, dword [esp + 0x18]
mov byte [esp + 0x30], 0
test edx, edx
je 0x42da9c
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42da72
sub eax, edi
cmp eax, 0xfe
jb 0x42da8c
push str.Too_long_SOCKS_proxy_name__cant_use__n
jmp 0x42db75
inc eax
push eax
push edx
lea edx, [esp + 0x38]
push edx
call fcn.00448250
add esp, 0xc
lea eax, [esp + 0x30]
xor ebp, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42daa5
sub eax, edx
cmp dword [esp + 0x1c], 0
lea edi, [eax + 9]
je 0x42dafe
mov eax, esi
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2d], cl
mov byte [esp + 0x2e], cl
mov byte [esp + 0x2f], 1
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42dad0
sub eax, edx
lea ebp, [eax + 1]
lea eax, [edi + ebp]
cmp eax, 0x106
jg 0x42dafc
mov ecx, edi
sub ecx, esi
mov eax, esi
lea edx, [esp + ecx + 0x28]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x42daf0
jmp 0x42dafe
xor ebp, ebp
mov edx, dword [esp + 0x20]
xor eax, eax
cmp edx, dword [ebx + 0x1a4]
lea ecx, [esp + 0x18]
sete al
push ecx
add edi, ebp
push edi
lea edx, [esp + 0x30]
push edx
push eax
push ebx
call fcn.00414370
add esp, 0x14
cmp dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
jne 0x42db70
cmp eax, edi
jne 0x42db70
cmp dword [esp + 0x1c], 0
je 0x42db9e
test ebp, ebp
jne 0x42db9e
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42db43
sub eax, edx
lea edi, [eax + 1]
lea eax, [esp + 0x14]
push eax
push edi
push esi
mov esi, dword [esp + 0x2c]
mov edx, esi
mov eax, ebx
call fcn.00414400
add esp, 0xc
test eax, eax
jne 0x42db70
cmp dword [esp + 0x14], edi
je 0x42dba2
push str.Failed_to_send_SOCKS4_connect_request.
mov eax, dword [esp + 0x14]
call fcn.00414140
mov eax, 7
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.004453f2
add esp, 0x16c
ret
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x18]
push ecx
push 8
lea edx, [esp + 0x30]
push edx
push esi
push ebx
call fcn.0042d620
add esp, 0x14
test eax, eax
jne 0x42dd33
cmp dword [esp + 0x18], 8
jne 0x42dd33
cmp byte [esp + 0x28], al
je 0x42dbd8
push str.SOCKS4_reply_has_wrong_version__version_should_be_4.
jmp 0x42db75
movzx eax, byte [esp + 0x29]
lea ecx, [eax - 0x5a]
cmp ecx, 3
ja case.default.0x42dbe9
jmp dword [ecx*4 + 0x42dd40]
cmp dword [esp + 0x1c], 0
mov eax, 0x466e10
jne 0x42dc01
mov eax, 0x461377
mov ecx, dword [esp + 0x10]
push eax
push str.SOCKS4_s_request_granted._n
call fcn.004140b0
add esp, 8
lea eax, [esp + 0x18]
push eax
push 0x8004667e
push esi
mov dword [esp + 0x24], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.004453f2
add esp, 0x16c
ret
movzx ecx, byte [esp + 0x30]
movzx edx, byte [esp + 0x31]
push eax
movzx eax, byte [esp + 0x33]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x31]
push ecx
movzx ecx, byte [esp + 0x36]
push eax
movzx eax, byte [esp + 0x38]
push ecx
push edx
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_or_failed.
mov eax, dword [esp + 0x2c]
call fcn.00414140
mov ecx, dword [esp + 0x190]
add esp, 0x1c
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 7
call fcn.004453f2
add esp, 0x16c
ret
movzx ecx, byte [esp + 0x30]
movzx edx, byte [esp + 0x31]
push eax
movzx eax, byte [esp + 0x33]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x31]
push ecx
movzx ecx, byte [esp + 0x36]
push eax
movzx eax, byte [esp + 0x38]
push ecx
push edx
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 0x42dc74
movzx ecx, byte [esp + 0x30]
movzx edx, byte [esp + 0x31]
push eax
movzx eax, byte [esp + 0x33]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x31]
push ecx
movzx ecx, byte [esp + 0x36]
push eax
movzx eax, byte [esp + 0x38]
push ecx
push edx
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 0x42dc74
movzx ecx, byte [esp + 0x30]
movzx edx, byte [esp + 0x31]
push eax
movzx eax, byte [esp + 0x33]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x31]
push ecx
movzx ecx, byte [esp + 0x36]
push eax
movzx eax, byte [esp + 0x38]
push ecx
push edx
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___Unknown.
jmp 0x42dc74
push str.Failed_to_receive_SOCKS4_connect_request_ack.
jmp 0x42db75