Function at 0x46da00
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
mov eax, dword [0x487080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x438], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x43c], eax
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x440], edi
cmp esi, 1
jae 0x46da40
mov esi, 1
jmp 0x46da4a
mov eax, 0xff
cmp esi, eax
cmova esi, eax
imul eax, dword [edi + 0x28], 0x178
mov ebx, dword [edi + 0x24]
mov dword [ebp - 0x450], esi
add eax, ebx
cmp ebx, eax
jae 0x46db5f
cmp dword [ebx + 0x24], 0
je 0x46da87
add ebx, 0x178
cmp ebx, eax
jb 0x46da64
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00472ead
mov esp, ebp
pop ebp
ret
cmp ebx, eax
jae 0x46db5f
mov eax, esi
shl eax, 4
sub eax, esi
shl eax, 2
push eax
mov dword [ebp - 0x44c], eax
call fcn.00472ba0
add esp, 4
mov dword [ebx + 0x28], eax
test eax, eax
je 0x46db5f
mov dword [ebx + 0x2c], esi
mov dword [ebx + 0x24], 1
inc dword [edi + 0x1c]
mov eax, dword [edi + 0x1c]
mov dword [ebx + 0x10], eax
cmp dword [edi + 0x28ac], 0
mov eax, dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x444], eax
jne 0x46daf0
mov ecx, dword [ebp - 0x438]
mov eax, dword [ecx]
mov dword [ebx + 0x18], eax
mov eax, dword [ecx + 4]
mov dword [ebx + 0x1c], eax
jmp 0x46de27
mov ecx, dword [ebp + 0x10]
push 0x400
push 0
mov eax, dword [ecx]
mov dword [edi + 0x28b0], eax
mov eax, dword [ecx + 4]
mov dword [edi + 0x28b4], eax
lea eax, [ebp - 0x404]
push eax
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [ebp - 0x438]
push 1
mov ax, word [ecx + 4]
mov word [ebp - 0x45c], ax
mov eax, dword [ecx]
mov dword [ebp - 0x460], eax
call fcn.0046d250
lea ecx, [ebp - 0x460]
mov dword [edi + 0x28a8], eax
push ecx
push eax
call fcn.0046d1d0
add esp, 0x18
cmp eax, 0xffffffff
jne 0x46db72
push str.invalid_proxy_n
call fcn.0046cf70
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00472ead
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x43c], 0
je 0x46dd29
push 4
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
push 0
push 4
push esi
mov dword [esi], 0x2000205
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_send]
push esi
call fcn.00473f95
add esp, 4
lea eax, [ebp - 0x404]
push 0
push 0x400
push eax
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x403], 2
je 0x46dbd5
push str.remove_user_pass_n
jmp 0x46db57
mov edx, dword [ebp - 0x43c]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46dbe0
lea eax, [edx + 0x20]
sub ecx, esi
mov edx, eax
mov dword [ebp - 0x448], ecx
mov dword [ebp - 0x458], eax
lea esi, [edx + 1]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x46dc00
sub edx, esi
lea esi, [ecx + 3]
add esi, edx
mov dword [ebp - 0x454], edx
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edi, eax
mov eax, dword [ebp - 0x448]
push eax
push dword [ebp - 0x43c]
mov byte [edi + 1], al
lea eax, [edi + 2]
push eax
mov byte [edi], 1
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x448]
mov ecx, dword [ebp - 0x454]
push ecx
push dword [ebp - 0x458]
mov byte [edi + eax + 2], cl
add eax, 3
add eax, edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x440]
add esp, 0x1c
push 0
push esi
push edi
push dword [eax + 0x28a8]
call dword [sym.imp.WS2_32.dll_send]
push edi
call fcn.00473f95
mov edi, dword [ebp - 0x440]
lea eax, [ebp - 0x404]
add esp, 4
push 0
push 0x400
push eax
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x403], 0
je 0x46dcaf
push str.wrong_user_pass_n
jmp 0x46db57
push 0xa
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov esi, eax
add esp, 4
mov dword [esi], 0x1000305
mov eax, dword [edi + 0x28b0]
mov dword [esi + 4], eax
movzx eax, byte [edi + 0x28b5]
push 0
mov byte [esi + 8], al
movzx eax, byte [edi + 0x28b4]
push 0xa
push esi
mov byte [esi + 9], al
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_send]
push esi
call fcn.00473f95
add esp, 4
lea eax, [ebp - 0x404]
push 0
push 0x400
push eax
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x403], 0
je 0x46ddfb
push str.proxy_not_supported_n
jmp 0x46db57
push 3
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
push 0
push 3
push esi
mov word [esi], 0x105
mov byte [esi + 2], 0
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_send]
push esi
call fcn.00473f95
add esp, 4
lea eax, [ebp - 0x404]
push 0
push 0x400
push eax
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x403], 0
je 0x46dd85
push str.proxy_require_user_pass_n
jmp 0x46db57
push 0xa
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov esi, eax
add esp, 4
mov dword [esi], 0x1000305
mov eax, dword [edi + 0x28b0]
mov dword [esi + 4], eax
movzx eax, byte [edi + 0x28b5]
push 0
mov byte [esi + 8], al
movzx eax, byte [edi + 0x28b4]
push 0xa
push esi
mov byte [esi + 9], al
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_send]
push esi
call fcn.00473f95
add esp, 4
lea eax, [ebp - 0x404]
push 0
push 0x400
push eax
push dword [edi + 0x28a8]
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x403], 0
je 0x46ddfb
push str.not_supported_proxy_n
jmp 0x46db57
push dword [ebp - 0x3fc]
call dword [ebp - 0x444]
movzx esi, ax
push esi
push str.success_connected_to_socks5_port__d___n
call fcn.0046cf70
mov ecx, dword [ebp - 0x438]
add esp, 8
mov eax, dword [ecx]
mov word [ebx + 0x1c], si
mov dword [ebx + 0x18], eax
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x46de35
mov eax, 0x10000
jmp 0x46de3b
shr eax, 0x10
shl eax, 0xc
mov dword [ebx + 0xb4], eax
cmp eax, 0x1000
jae 0x46de54
mov dword [ebx + 0xb4], 0x1000
jmp 0x46de65
cmp eax, 0x10000
jbe 0x46de65
mov dword [ebx + 0xb4], 0x10000
mov esi, dword [ebx + 0x28]
mov eax, dword [ebp - 0x44c]
add eax, esi
cmp esi, eax
jae 0x46debf
mov edi, dword [ebp - 0x44c]
nop word [eax + eax]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 0x26], eax
lea eax, [esi + 0x2c]
push eax
call fcn.00472b00
lea eax, [esi + 0x34]
push eax
call fcn.00472b00
xor eax, eax
xorps xmm0, xmm0
mov word [esi + 4], ax
add esp, 8
movups xmmword [esi + 6], xmm0
movups xmmword [esi + 0x16], xmm0
mov eax, dword [ebx + 0x28]
add esi, 0x3c
add eax, edi
cmp esi, eax
jb 0x46de80
mov edi, dword [ebp - 0x440]
mov word [ebp - 0x434], 0xff82
movzx eax, word [ebx + 0xe]
push eax
call dword [ebp - 0x444]
mov esi, dword [sym.imp.WS2_32.dll_htonl]
mov word [ebp - 0x430], ax
movzx eax, byte [ebx + 0x15]
mov byte [ebp - 0x42e], al
movzx eax, byte [ebx + 0x14]
mov byte [ebp - 0x42d], al
push dword [ebx + 0xb0]
call esi
mov dword [ebp - 0x42c], eax
push dword [ebx + 0xb4]
call esi
push dword [ebp - 0x450]
mov dword [ebp - 0x428], eax
call esi
push dword [edi + 0xc]
mov dword [ebp - 0x424], eax
call esi
push dword [edi + 0x10]
mov dword [ebp - 0x420], eax
call esi
mov dword [ebp - 0x41c], eax
push dword [ebx + 0x84]
call esi
mov dword [ebp - 0x418], eax
push dword [ebx + 0x7c]
call esi
mov dword [ebp - 0x414], eax
push dword [ebx + 0x80]
call esi
push dword [ebp + 0x1c]
mov dword [ebp - 0x410], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x40c], eax
call esi
push 0
push 0
mov dword [ebp - 0x408], eax
lea eax, [ebp - 0x434]
push 0
push eax
push ebx
call fcn.004722d0
mov ecx, dword [ebp - 4]
add esp, 0x14
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00472ead
mov esp, ebp
pop ebp
ret