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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x4ea5e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x114], eax
mov eax, dword [eax + 0x150]
push ebx
push esi
mov byte [ebp - 0x110], 5
test eax, eax
jne 0x40b1c3
push str.SOCKS5_AUTH
call fcn.004aa9ad
mov esi, eax
add esp, 4
test esi, esi
jne 0x40b1b3
mov ebx, str.SOCKS5_AUTH
call fcn.0040a050
test eax, eax
je 0x40b1b3
mov esi, dword [eax + 4]
mov eax, esi
test esi, esi
jne 0x40b1c3
mov word [ebp - 0x10], 0x200
mov al, 2
jmp 0x40b1cc
lea ecx, [ebp - 0x10]
push ecx
call fcn.0040b060
movzx ebx, al
mov byte [ebp - 0x10f], al
lea esi, [ebp - 0x10e]
test ebx, ebx
jle 0x40b1f6
push ebx
lea edx, [ebp - 0x10]
push edx
mov eax, esi
push eax
call fcn.004b29a0
add esp, 0xc
lea esi, [ebp + ebx - 0x10e]
lea ecx, [ebp - 0x110]
sub esi, ecx
xor ebx, ebx
test esi, esi
jle 0x40b223
push 0
push esi
lea edx, [ebp + ebx - 0x110]
push edx
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x40b223
sub esi, eax
add ebx, eax
test esi, esi
jg 0x40b204
mov esi, 2
xor ebx, ebx
lea ebx, [ebx]
push 0
push esi
lea eax, [ebp + ebx - 0x110]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40b253
test eax, eax
je 0x40b253
sub esi, eax
add ebx, eax
test esi, esi
jg 0x40b230
cmp byte [ebp - 0x110], 5
jne 0x40b278
mov al, byte [ebp - 0x10f]
cmp al, 0xff
je 0x40b278
movzx eax, al
sub eax, 0
je 0x40b2a1
sub eax, 2
je 0x40b28d
sub eax, 0xfd
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebp - 0x114]
push edi
mov ecx, esi
call fcn.0040ae60
test eax, eax
je 0x40b2a7
jmp 0x40b278
mov esi, dword [ebp - 0x114]
mov eax, dword [esi + 0x118]
mov word [ebp - 0x110], 0x105
mov byte [ebp - 0x10e], 0
test eax, eax
jne 0x40b2fb
lea edx, [esi + 0x10]
mov eax, edx
mov byte [ebp - 0x10d], 3
lea ebx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40b2d0
sub eax, ebx
mov ebx, eax
push ebx
push edx
lea ecx, [ebp - 0x10b]
push ecx
mov byte [ebp - 0x10c], bl
call fcn.004b29a0
add esp, 0xc
lea eax, [ebp + ebx - 0x10b]
jmp 0x40b30e
mov dword [ebp - 0x10c], eax
mov byte [ebp - 0x10d], 1
lea eax, [ebp - 0x108]
mov dl, byte [esi + 0x111]
mov byte [eax], dl
mov cl, byte [esi + 0x110]
inc eax
mov byte [eax], cl
lea edx, [ebp - 0x110]
mov ecx, edx
sub eax, edx
push ecx
inc eax
push edi
call fcn.0040acf0
mov esi, 4
xor ebx, ebx
jmp 0x40b340
push 0
push esi
lea edx, [ebp + ebx - 0x110]
push edx
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40b363
test eax, eax
je 0x40b363
sub esi, eax
add ebx, eax
test esi, esi
jg 0x40b340
cmp byte [ebp - 0x10f], 0
jne 0x40b278
movzx eax, byte [ebp - 0x10d]
dec eax
je 0x40b42e
sub eax, 2
je 0x40b3d0
dec eax
jne 0x40b458
mov esi, 0x12
xor ebx, ebx
push 0
push esi
lea eax, [ebp + ebx - 0x10c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40b458
test eax, eax
je 0x40b458
sub esi, eax
add ebx, eax
test esi, esi
jg 0x40b391
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret 4
mov esi, 1
xor ebx, ebx
jmp 0x40b3e0
push 0
push esi
lea ecx, [ebp + ebx - 0x10c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40b403
test eax, eax
je 0x40b403
sub esi, eax
add ebx, eax
test esi, esi
jg 0x40b3e0
movzx eax, byte [ebp - 0x10c]
lea edx, [ebp - 0x10b]
push edx
add eax, 2
push edi
call fcn.0040ad40
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret 4
mov esi, 6
xor ebx, ebx
push 0
push esi
lea eax, [ebp + ebx - 0x10c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40b458
test eax, eax
je 0x40b458
sub esi, eax
add ebx, eax
test esi, esi
jg 0x40b435
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret 4