Function at 0x10003132
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x330
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x14]
push edi
push ebx
push esi
push str.process_socks5_packet__:_buf
call fcn.100188b0
push 0x12c
lea eax, [ebp - 0x230]
push 0
push eax
call fcn.10019d20
mov edi, dword [ebp + 0xc]
mov al, byte [edi + 0x2a]
add esp, 0x18
mov byte [ebp - 0x230], 5
test al, al
jne 0x1000320e
push ebx
push str.process_socks5_packet__:_got_1_st_authentication_packet_buf_len_u
call fcn.10018570
mov al, byte [esi]
pop ecx
pop ecx
cmp al, 5
je 0x100031aa
push ebx
movzx eax, al
push eax
push str.process_socks5_packet__:_bad_socks_proto:__02x_buf_len_u
push 0
call main
add esp, 0x10
or eax, 0xffffffff
jmp 0x1000351b
movzx ecx, byte [esi + 1]
xor eax, eax
test ecx, ecx
jle 0x100031c7
add ebx, 0xfffffffe
cmp eax, ebx
jge 0x100031c7
cmp byte [eax + esi + 2], 2
je 0x100031f7
inc eax
cmp eax, ecx
jl 0x100031b7
push str.process_socks5_packet__:_auth_method_not_selected
push 0
call main
pop ecx
mov byte [ebp - 0x22f], 0xff
pop ecx
push 2
lea eax, [ebp - 0x230]
push eax
push dword [edi + 6]
push 3
push dword [ebp + 8]
call fcn.10001187
jmp 0x100034d4
push str.process_socks5_packet__:_auth_method_selected_ok_
mov byte [ebp - 0x22f], 2
mov byte [edi + 0x2a], 1
call fcn.10018570
jmp 0x100031db
cmp al, 1
jne 0x1000332f
push ebx
push str.process_socks5_packet__:_got_2_nd_authentication_packet_buf_len_u
call fcn.10018570
movzx edi, byte [esi + 1]
lea eax, [edi + 4]
pop ecx
pop ecx
cmp ebx, eax
jge 0x10003247
push ebx
push edi
push str.process_socks5_packet__:_bad_packet_length_username_len_u_buf_len_u
push 0
call main
add esp, 0x10
push 0xfffffffffffffffe
pop eax
jmp 0x1000351b
push edi
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x330]
push eax
call fcn.10019c40
lea eax, [edi + esi]
movzx ebx, byte [eax + 2]
lea ecx, [ebx + edi + 3]
add esp, 0xc
mov byte [ebp + edi - 0x330], 0
cmp dword [ebp + 0x18], ecx
jge 0x1000328b
push dword [ebp + 0x18]
push ebx
push edi
push str.process_socks5_packet__:_bad_packet_length_username_len_u_password_len_u_buf_len_u
push 0
call main
add esp, 0x14
push 0xfffffffffffffffd
jmp 0x10003241
add eax, 3
push ebx
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.10019c40
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x330]
push eax
push str.process_socks5_packet__:_username_s_password_s
mov byte [ebp + ebx - 0x104], 0
call fcn.10018570
mov al, byte [esi]
mov ebx, dword [ebp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
add esp, 0x18
mov byte [ebp - 0x230], al
lea edi, [ebx + 0x45]
push edi
lea eax, [ebp - 0x330]
push eax
call esi
test eax, eax
jne 0x10003314
add ebx, 0x145
push ebx
lea eax, [ebp - 0x104]
push eax
call esi
test eax, eax
jne 0x10003314
push ebx
push edi
push str.process_socks5_packet__:_auth_ok__l_out_port__socks_username_s_l_out_port__socks_password_s
call fcn.10018570
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov byte [ebp - 0x22f], 0
mov byte [eax + 0x2a], 2
jmp 0x1000331b
mov byte [ebp - 0x22f], 1
push 2
lea eax, [ebp - 0x230]
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 6]
jmp 0x100031e8
cmp al, 2
jne 0x10003506
mov al, byte [esi + 1]
cmp al, 1
jne 0x100034e6
mov bl, byte [esi + 3]
movzx eax, bl
push eax
xor edi, edi
push str.process_socks5_packet__:_got_CONNECT_cmd_ATYP_02x
mov dword [ebp - 4], edi
call fcn.10018570
mov al, byte [esi]
pop ecx
pop ecx
cmp al, 5
je 0x10003368
push dword [ebp + 0x18]
jmp 0x1000318f
cmp bl, 1
jne 0x10003376
mov ebx, dword [esi + 4]
movzx eax, word [esi + 8]
jmp 0x100033c1
cmp bl, 3
jne 0x100033ea
movzx edi, byte [esi + 4]
push edi
lea eax, [esi + 5]
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.10019c40
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
mov byte [ebp + edi - 0x104], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x100033cd
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100033cd
cmp dword [eax], 0
je 0x100033cd
mov eax, dword [eax]
mov ebx, dword [eax]
movzx eax, word [edi + esi + 5]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
jmp 0x10003410
lea eax, [ebp - 0x104]
push eax
push str.process_socks5_packet__:_gethostbyname__s__failed
push 0
call main
push 4
push dword [ebp + 0xc]
jmp 0x100034f9
cmp bl, 4
jne 0x1000340d
push str.process_socks5_packet__:_CONNECT_IPv6_is_not_supported_yet
push 0
call main
push 8
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.100030f2
jmp 0x100034d4
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
push 2
add esi, 0x45
push 0x10032e28
push esi
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x10003460
cmp di, 0x19
je 0x1000344c
mov eax, 0x24b
cmp di, ax
jne 0x10003460
push 4
push str.pups
push esi
call dword [sym.imp.SHLWAPI.dll_StrCmpNA]
test eax, eax
je 0x10003460
movzx eax, di
push eax
push str.process_socks5_packet__:_block_port__u
push 0
call main
push 2
jmp 0x100033e2
lea eax, [ebp - 4]
push eax
push 0
push edi
push ebx
call fcn.1001c930
mov ecx, dword [ebp + 0xc]
add esp, 0x10
mov dword [ecx + 0xa], eax
test eax, eax
jns 0x100034b0
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
call esi
push eax
movzx eax, di
push eax
push ebx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.process_socks5_packet__:_tcp_connect___to__s:_u_failed
call esi
push eax
call main
push 5
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.100030f2
add esp, 0x20
jmp 0x10003519
cmp dword [ebp - 4], 1
jne 0x100034d9
push dword [ecx + 6]
mov byte [ecx + 0x20], 1
push eax
movzx eax, di
push eax
push ebx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.process_socks5_packet__:_tcp_connect___to__s:_u_in_progress_oc__sock_d_oc__conn_id_d
call fcn.10018570
add esp, 0x14
jmp 0x10003519
push ecx
push dword [ebp + 8]
call fcn.1000304e
pop ecx
pop ecx
jmp 0x10003519
movzx eax, al
push eax
push str.process_socks5_packet__:_cmd__02x_not_supported
push 0
call main
push 7
push edi
push dword [ebp + 8]
call fcn.100030f2
add esp, 0x18
jmp 0x10003519
movzx eax, al
push eax
push str.process_socks5_packet__:_unknown_socks_state:_oc__socks_state_u
push 0
call main
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret