Function at 0x5603b0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x15c], ecx
push edi
mov ecx, dword [ebx + 0xd0]
mov edi, edx
mov esi, dword [ebx]
xor edx, edx
mov eax, dword [ebx + eax*4 + 0x1a8]
mov dword [ebp - 0x164], ecx
mov ecx, esi
push 1
mov dword [ebp - 0x168], edi
mov dword [ebp - 0x160], ebx
mov dword [ebp - 0x16c], eax
call fcn.00544390
add esp, 4
test edx, edx
jg 0x560437
jl 0x560413
test eax, eax
jae 0x560437
push str.Connection_time_out
push esi
call fcn.00543790
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x26a], 0
mov ecx, 0x6292df
mov ebx, dword [ebp + 8]
je 0x56046f
cmp dword [ebp - 0x164], 6
mov eax, 0x63c55c
push ebx
push edi
cmovne eax, ecx
mov ecx, dword [ebp - 0x160]
push eax
push str.SOCKS4_s:_connecting_to_HTTP_proxy__s_port__d_n
push dword [ecx]
call fcn.00543710
add esp, 0x14
lea eax, [ebp - 0x158]
mov dword [ebp - 0x158], 0
push eax
push 0x8004667e
push dword [ebp - 0x16c]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push ebx
push edi
push str.SOCKS4_communication_to__s:_d_n
push esi
call fcn.00543710
mov eax, ebx
mov word [ebp - 0x114], 0x104
sar eax, 8
add esp, 0x10
cmp dword [ebp - 0x164], 6
mov byte [ebp - 0x112], al
mov byte [ebp - 0x111], bl
je 0x5605e3
lea eax, [ebp - 0x158]
mov edx, edi
push eax
push ebx
mov ebx, dword [ebp - 0x160]
mov ecx, ebx
call fcn.005467c0
add esp, 8
cmp eax, 0xffffffff
jne 0x5604fd
mov eax, 5
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x56050f
lea edx, [ebp - 0x158]
mov ecx, ebx
call fcn.005514c0
mov ebx, dword [ebp - 0x158]
test ebx, ebx
je 0x5605be
mov edi, dword [ebx]
test edi, edi
je 0x5605b8
mov ecx, dword [edi + 4]
mov eax, ecx
sub eax, 2
jne 0x560550
mov edx, dword [edi + 0x18]
lea eax, [ebp - 0x154]
push 0x40
push eax
add edx, 4
mov ecx, 2
call fcn.0055d670
mov ecx, dword [edi + 4]
add esp, 8
cmp ecx, 2
jne 0x560594
mov ecx, dword [edi + 0x18]
movzx eax, byte [ecx + 4]
mov byte [ebp - 0x110], al
movzx eax, byte [ecx + 5]
mov byte [ebp - 0x10f], al
movzx eax, byte [ecx + 6]
mov byte [ebp - 0x10e], al
movzx eax, byte [ecx + 7]
mov byte [ebp - 0x10d], al
lea eax, [ebp - 0x154]
push eax
push str.SOCKS4_connect_to_IPv4__s__locally_resolved__n
push esi
call fcn.00543710
jmp 0x5605a8
lea eax, [ebp - 0x154]
xor edi, edi
push eax
push str.SOCKS4_connection_to__s_not_supported_n
push esi
call fcn.00543790
add esp, 0xc
mov edx, ebx
mov ecx, esi
call fcn.00546940
test edi, edi
jne 0x5605e3
mov edi, dword [ebp - 0x168]
push edi
push str.Failed_to_resolve___s__for_SOCKS4_connect.
push esi
call fcn.00543790
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x15c]
mov byte [ebp - 0x10c], 0
test ebx, ebx
je 0x56062f
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x560600
sub ecx, edx
cmp ecx, 0xfe
jb 0x56061b
push str.Too_long_SOCKS_proxy_name__cant_use__n
jmp 0x560973
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x10c]
push ebx
push eax
call fcn.005cfab0
add esp, 0xc
lea ecx, [ebp - 0x10c]
xor edi, edi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x560640
sub ecx, edx
cmp dword [ebp - 0x164], 6
lea ebx, [ecx + 9]
jne 0x5606a5
mov edx, dword [ebp - 0x168]
mov ecx, edx
mov dword [ebp - 0x110], 0x1000000
lea edi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x560670
sub ecx, edi
lea edi, [ecx + 1]
lea eax, [ebx + edi]
cmp eax, 0x106
jg 0x5606a3
mov eax, ebx
mov ecx, edx
sub eax, edx
lea edx, [ebp - 0x114]
add edx, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x560694
jmp 0x5606a5
xor edi, edi
mov ecx, dword [ebp - 0x160]
xor eax, eax
mov edx, dword [ebp - 0x16c]
cmp edx, dword [ecx + 0x1ac]
lea edx, [ebp - 0x15c]
push edx
sete al
lea edx, [ebp - 0x114]
add ebx, edi
push ebx
push edx
push eax
push ecx
call fcn.00543aa0
add esp, 0x14
mov dword [ebp - 0x158], eax
cmp dword [ebp - 0x15c], 0
jne 0x56096e
cmp eax, ebx
jne 0x56096e
mov ebx, dword [ebp - 0x164]
cmp ebx, 6
jne 0x56074d
test edi, edi
jne 0x56074d
mov edx, dword [ebp - 0x168]
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x560710
sub ecx, edi
lea eax, [ebp - 0x158]
push eax
lea edi, [ecx + 1]
mov ecx, dword [ebp - 0x160]
push edi
push edx
mov edx, dword [ebp - 0x16c]
call fcn.00543bf0
add esp, 0xc
test eax, eax
jne 0x56096e
cmp dword [ebp - 0x158], edi
jne 0x56096e
mov edi, dword [ebp - 0x16c]
lea eax, [ebp - 0x15c]
mov ecx, dword [ebp - 0x160]
mov edx, edi
push eax
lea eax, [ebp - 0x114]
push 8
push eax
call fcn.00560200
add esp, 0xc
test eax, eax
jne 0x560967
cmp dword [ebp - 0x15c], 8
jne 0x560967
cmp byte [ebp - 0x114], al
je 0x56079a
push str.SOCKS4_reply_has_wrong_version__version_should_be_4.
jmp 0x560973
movzx eax, byte [ebp - 0x113]
lea ecx, [eax - 0x5a]
cmp ecx, 3
ja case.default.0x5607ad
jmp dword [ecx*4 + 0x560994]
cmp ebx, 6
mov ecx, 0x6292df
mov eax, 0x63c55c
cmovne eax, ecx
push eax
push str.SOCKS4_s_request_granted._n
push esi
call fcn.00543710
add esp, 0xc
mov dword [ebp - 0x15c], 1
lea eax, [ebp - 0x15c]
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x111]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x10d]
push ecx
push eax
movzx eax, byte [ebp - 0x10e]
push eax
movzx eax, byte [ebp - 0x10f]
push eax
movzx eax, byte [ebp - 0x110]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_or_failed.
push esi
call fcn.00543790
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x111]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x10d]
push ecx
push eax
movzx eax, byte [ebp - 0x10e]
push eax
movzx eax, byte [ebp - 0x10f]
push eax
movzx eax, byte [ebp - 0x110]
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.
push esi
call fcn.00543790
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x111]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x10d]
push ecx
push eax
movzx eax, byte [ebp - 0x10e]
push eax
movzx eax, byte [ebp - 0x10f]
push eax
movzx eax, byte [ebp - 0x110]
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.
push esi
call fcn.00543790
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x112]
push eax
movzx eax, byte [ebp - 0x111]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x10d]
push ecx
push eax
movzx eax, byte [ebp - 0x10e]
push eax
movzx eax, byte [ebp - 0x10f]
push eax
movzx eax, byte [ebp - 0x110]
push eax
push str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___Unknown.
push esi
call fcn.00543790
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
push str.Failed_to_receive_SOCKS4_connect_request_ack.
jmp 0x560973
push str.Failed_to_send_SOCKS4_connect_request.
push esi
call fcn.00543790
mov ecx, dword [ebp - 8]
add esp, 8
xor ecx, ebp
mov eax, 7
pop edi
pop esi
pop ebx
call fcn.005b8427
mov esp, ebp
pop ebp
ret