Function at 0x1001f440
Capabilities:
Check for time delay via gettickcount
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x164], ecx
mov ecx, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x170], edx
mov edx, dword [ebp + 0x14]
mov ebx, dword [ecx]
mov eax, dword [ecx + eax*4 + 0x154]
mov dword [ebp - 0x160], ecx
mov ecx, 0x493e0
mov dword [ebp - 0x168], eax
xor eax, eax
mov dword [ebp - 0x16c], edx
mov edx, dword [ebx + 0x1c8]
test edx, edx
mov dword [ebp - 0x15c], ecx
mov ecx, 1
cmovg eax, ecx
mov ecx, dword [ebx + 0x1cc]
push esi
push edi
test ecx, ecx
jle 0x1001f4b0
or eax, 2
dec eax
je 0x1001f4d0
dec eax
je 0x1001f4c8
dec eax
jne 0x1001f4d6
cmp edx, ecx
mov eax, ecx
cmovl eax, edx
mov dword [ebp - 0x15c], eax
jmp 0x1001f4d6
mov dword [ebp - 0x15c], ecx
jmp 0x1001f4d6
mov dword [ebp - 0x15c], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
mov eax, 0x10624dd3
mov edi, edx
shr edi, 6
imul ecx, edi, 0x3e8
sub esi, ecx
imul ecx, esi, 0x3e8
mov esi, dword [ebx + 0x4a8]
sub esi, edi
sub ecx, dword [ebx + 0x4ac]
imul ecx
imul eax, esi, 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
mov ecx, dword [ebp - 0x15c]
add ecx, eax
je 0x1001faa6
test ecx, ecx
js 0x1001faa6
lea eax, [ebp - 0x15c]
mov dword [ebp - 0x15c], 0
push eax
push 0x8004667e
push dword [ebp - 0x168]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [ebp + 8]
mov edi, dword [ebp - 0x170]
push edi
push str.SOCKS4_communication_to__s:_d_n
push ebx
call fcn.10010cc0
mov ecx, dword [ebp + 8]
add esp, 0x10
mov eax, ecx
mov word [ebp - 0x118], 0x104
sar eax, 8
cmp byte [ebp - 0x16c], 0
mov byte [ebp - 0x116], al
mov byte [ebp - 0x115], cl
jne 0x1001f6b6
mov esi, dword [ebp - 0x160]
lea eax, [ebp - 0x15c]
push eax
push ecx
mov edx, edi
mov ecx, esi
call fcn.1000f890
add esp, 8
cmp eax, 0xffffffff
jne 0x1001f5ce
mov eax, 5
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x1001f5e0
lea edx, [ebp - 0x15c]
mov ecx, esi
call fcn.10010130
mov eax, dword [ebp - 0x15c]
test eax, eax
je 0x1001f691
mov esi, dword [eax]
test esi, esi
je 0x1001f691
mov eax, dword [esi + 4]
sub eax, 2
jne 0x1001f616
mov ecx, dword [esi + 0x18]
lea edx, [ebp - 0x158]
add ecx, 4
push 0x40
call fcn.10031970
add esp, 4
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 fcn.10046116
add esp, 0x18
cmp eax, 4
jne 0x1001f669
movzx eax, byte [ebp - 0xc]
mov byte [ebp - 0x114], al
movzx eax, byte [ebp - 0xa]
mov byte [ebp - 0x113], al
movzx eax, byte [ebp - 8]
mov byte [ebp - 0x112], al
movzx eax, byte [ebp - 6]
mov byte [ebp - 0x111], al
jmp 0x1001f66b
xor esi, esi
lea eax, [ebp - 0x158]
push eax
push str.SOCKS4_connect_to__s__locally_resolved__n
push ebx
call fcn.10010cc0
mov edx, dword [ebp - 0x15c]
add esp, 0xc
mov ecx, ebx
call fcn.1000fa20
test esi, esi
jne 0x1001f6b6
push edi
push str.Failed_to_resolve___s__for_SOCKS4_connect.
push ebx
call fcn.10010d80
add esp, 0xc
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x164]
mov byte [ebp - 0x110], 0
test edx, edx
je 0x1001f719
mov ecx, edx
lea esi, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001f6d0
sub ecx, esi
cmp ecx, 0xfe
jb 0x1001f705
push str.Too_long_SOCKS_proxy_name__cant_use__n
push ebx
call fcn.10010d80
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
lea eax, [ecx + 1]
push eax
push edx
lea eax, [ebp - 0x110]
push eax
call fcn.1003f7f0
add esp, 0xc
lea ecx, [ebp - 0x110]
xor esi, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001f724
sub ecx, edx
lea edx, [ecx + 9]
mov dword [ebp - 0x164], edx
cmp byte [ebp - 0x16c], al
je 0x1001f78b
mov ecx, edi
mov dword [ebp - 0x114], 0x1000000
lea esi, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001f750
sub ecx, esi
lea esi, [ecx + 1]
lea eax, [edx + esi]
cmp eax, 0x106
jg 0x1001f789
mov eax, edx
mov ecx, edi
sub eax, edi
lea edx, [ebp - 0x118]
add edx, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x1001f774
mov edx, dword [ebp - 0x164]
jmp 0x1001f78b
xor esi, esi
mov ecx, dword [ebp - 0x160]
xor eax, eax
mov edi, dword [ebp - 0x168]
cmp edi, dword [ecx + 0x158]
lea edi, [ebp - 0x164]
push edi
sete al
add edx, esi
push edx
mov dword [ebp - 8], edx
lea edx, [ebp - 0x118]
push edx
push eax
push ecx
call fcn.100110e0
mov edi, dword [ebp - 0x170]
add esp, 0x14
cmp dword [ebp - 0x164], 0
mov dword [ebp - 0x15c], eax
jne 0x1001f82d
cmp eax, dword [ebp - 8]
jne 0x1001f82d
cmp byte [ebp - 0x16c], 0
je 0x1001f851
test esi, esi
jne 0x1001f851
mov ecx, edi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001f7f0
mov esi, dword [ebp - 0x160]
sub ecx, edx
mov edx, dword [ebp - 0x168]
lea eax, [ecx + 1]
lea ecx, [ebp - 0x15c]
mov dword [ebp - 8], eax
push ecx
push eax
push edi
mov ecx, esi
call fcn.10011170
add esp, 0xc
test eax, eax
jne 0x1001f82d
mov eax, dword [ebp - 8]
cmp dword [ebp - 0x15c], eax
je 0x1001f857
push str.Failed_to_send_SOCKS4_connect_request.
push ebx
call fcn.10010d80
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x160]
mov edx, dword [ebp - 0x168]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x118]
mov ecx, esi
push 8
push eax
call fcn.1001f2f0
add esp, 0xc
test eax, eax
jne 0x1001fa82
cmp dword [ebp - 8], 8
jne 0x1001fa82
cmp byte [ebp - 0x118], al
je 0x1001f8b2
push str.SOCKS4_reply_has_wrong_version__version_should_be_4.
push ebx
call fcn.10010d80
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebp - 0x117]
lea ecx, [eax - 0x5a]
cmp ecx, 3
ja case.default.0x1001f8c5
jmp dword [ecx*4 + 0x1001facc]
cmp byte [ebp - 0x16c], 0
mov ecx, 0x10055f06
mov eax, 0x10058404
cmove eax, ecx
push eax
push str.SOCKS4_s_request_granted._n
push ebx
call fcn.10010cc0
add esp, 0xc
mov dword [ebp - 8], 1
lea eax, [ebp - 8]
push eax
push 0x8004667e
push dword [ebp - 0x168]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
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.
push ebx
call fcn.10010d80
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
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.
push ebx
call fcn.10010d80
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
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.
push ebx
call fcn.10010d80
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 0x110]
push eax
movzx eax, byte [ebp - 0x10f]
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 ebx
call fcn.10010d80
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
push str.Failed_to_receive_SOCKS4_connect_request_ack.
push ebx
call fcn.10010d80
mov eax, 7
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
push str.Connection_time_out
push ebx
call fcn.10010d80
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x1c
pop edi
pop esi
pop ebx
call fcn.100370be
mov esp, ebp
pop ebp
ret