Function at 0x41eb70
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x16c
mov eax, dword [0x751f00]
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 0x41ebd4
lea ecx, [edi + 1]
mov edx, dword [edx + 0x1e4]
test edx, edx
jle 0x41ebe1
or ecx, 2
sub ecx, 1
je 0x41ebf6
sub ecx, 1
je 0x41ebf4
sub ecx, 1
jne 0x41ebfb
cmp eax, edx
jl 0x41ebf6
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.0056a120
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 0x41ec73
test edi, edi
jg 0x41ec8b
jl 0x41ec73
test ebp, ebp
jae 0x41ec8b
mov eax, dword [esp + 0x10]
push str.Connection_time_out
call fcn.0040f9d0
mov eax, 0x1c
jmp 0x41ef63
cmp dword [ebx + 0x2b0], 0
je 0x41ecc4
cmp dword [esp + 0x1c], 0
mov eax, 0x720f5c
jne 0x41eca5
mov eax, 0x71e845
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.0040f940
add esp, 0x10
jmp 0x41ecc8
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.0040f940
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 0x41ee40
lea ecx, [esp + 0x14]
push ecx
push eax
push esi
push ebx
call fcn.0040e140
add esp, 0x10
cmp eax, 0xffffffff
jne 0x41ed5a
mov eax, 5
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.0055e7fd
add esp, 0x16c
ret
cmp eax, 1
jne 0x41ed6e
lea edx, [esp + 0x14]
push edx
mov edi, ebx
call fcn.0040eb50
add esp, 4
mov edi, dword [esp + 0x14]
test edi, edi
je 0x41ee11
mov ebp, dword [edi]
test ebp, ebp
je 0x41ee11
mov eax, dword [ebp + 4]
sub eax, 2
jne 0x41eda4
mov eax, dword [ebp + 0x18]
add eax, 4
push 0x40
push eax
lea esi, [esp + 0x138]
call fcn.00431340
add esp, 8
cmp dword [ebp + 4], 2
jne 0x41ede5
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.0040f940
jmp 0x41edfd
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.0040f9d0
mov esi, dword [esp + 0x18]
add esp, 8
call fcn.0040e2e0
mov esi, dword [esp + 0x24]
test ebp, ebp
jne 0x41ee40
mov eax, dword [esp + 0x10]
push esi
push str.Failed_to_resolve___s__for_SOCKS4_connect.
call fcn.0040f9d0
add esp, 8
mov eax, 6
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.0055e7fd
add esp, 0x16c
ret
mov edx, dword [esp + 0x18]
mov byte [esp + 0x30], 0
test edx, edx
je 0x41ee7c
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41ee52
sub eax, edi
cmp eax, 0xfe
jb 0x41ee6c
push str.Too_long_SOCKS_proxy_name__cant_use__n
jmp 0x41ef55
inc eax
push eax
push edx
lea edx, [esp + 0x38]
push edx
call fcn.0055f610
add esp, 0xc
lea eax, [esp + 0x30]
xor ebp, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41ee85
sub eax, edx
cmp dword [esp + 0x1c], 0
lea edi, [eax + 9]
je 0x41eede
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 0x41eeb0
sub eax, edx
lea ebp, [eax + 1]
lea eax, [edi + ebp]
cmp eax, 0x106
jg 0x41eedc
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 0x41eed0
jmp 0x41eede
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.0040fc00
add esp, 0x14
cmp dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
jne 0x41ef50
cmp eax, edi
jne 0x41ef50
cmp dword [esp + 0x1c], 0
je 0x41ef7e
test ebp, ebp
jne 0x41ef7e
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41ef23
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.0040fc90
add esp, 0xc
test eax, eax
jne 0x41ef50
cmp dword [esp + 0x14], edi
je 0x41ef82
push str.Failed_to_send_SOCKS4_connect_request.
mov eax, dword [esp + 0x14]
call fcn.0040f9d0
mov eax, 7
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.0055e7fd
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.0041ea00
add esp, 0x14
test eax, eax
jne 0x41f113
cmp dword [esp + 0x18], 8
jne 0x41f113
cmp byte [esp + 0x28], al
je 0x41efb8
push str.SOCKS4_reply_has_wrong_version__version_should_be_4.
jmp 0x41ef55
movzx eax, byte [esp + 0x29]
lea ecx, [eax - 0x5a]
cmp ecx, 3
ja case.default.0x41efc9
jmp dword [ecx*4 + 0x41f120]
cmp dword [esp + 0x1c], 0
mov eax, 0x720f5c
jne 0x41efe1
mov eax, 0x71e845
mov ecx, dword [esp + 0x10]
push eax
push str.SOCKS4_s_request_granted._n
call fcn.0040f940
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.0055e7fd
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.0040f9d0
mov ecx, dword [esp + 0x190]
add esp, 0x1c
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 7
call fcn.0055e7fd
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 0x41f054
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 0x41f054
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 0x41f054
push str.Failed_to_receive_SOCKS4_connect_request_ack.
jmp 0x41ef55