Function at 0x423810
Capabilities:
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
sub esp, 0xc6c
mov eax, dword [eax + 0x2b8]
mov dword [esp + 0x2c], ecx
mov byte [esp + 0x5d], 4
mov byte [esp + 0x5e], 1
mov dword [esp], eax
call sym._atoi
mov edx, eax
mov byte [esp + 0x60], al
mov eax, dword [ebx + 0x2c8]
shr dx, 8
mov dword [esp + 0x65], 0x494d4743
mov dword [esp + 0x69], 0x52454e
mov byte [esp + 0x5f], dl
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
sub esp, 4
mov ebp, dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp], eax
call ebp
sub esp, 4
cmp eax, 0xffffffff
lea esi, [esp + 0x260]
je 0x4239e0
mov edx, eax
mov byte [esp + 0x64], al
mov dword [esp + 0xc], 0
shr edx, 0x18
mov dword [esp + 8], 0x10
mov dword [esp], edi
mov byte [esp + 0x61], dl
mov edx, eax
shr edx, 0x10
mov byte [esp + 0x62], dl
mov edx, eax
lea eax, [esp + 0x5d]
shr edx, 8
mov byte [esp + 0x63], dl
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_send]
sub esp, 0x10
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], edi
mov ebp, dword [sym.imp.WS2_32.dll_recv]
call ebp
sub esp, 0x10
cmp eax, 0xffffffff
je 0x4238fc
cmp byte [esp + 0x260], 0
je 0x423970
cmp byte [0x745ef7], 0
jne 0x423917
cmp byte [0x732fa0], 0
jne 0x423917
mov eax, dword [0x5bc2e0]
test eax, eax
jle 0x42395b
mov eax, dword [ebx + 0x2d0]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x2cc]
mov dword [esp + 8], str.Bad_response_from__s:_s_SOCKS4_server
mov dword [esp + 4], 0xa00
mov dword [esp], esi
mov dword [esp + 0xc], eax
call sym._snprintf_1
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 1
call sym.__applog
xor eax, eax
add esp, 0xc6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], edi
call ebp
sub esp, 0x10
cmp eax, 0xffffffff
je 0x4238fc
cmp byte [esp + 0x260], 0x5a
jne 0x4238fc
mov ebx, 6
nop
lea esi, [esi]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], edi
call ebp
sub esp, 0x10
sub ebx, 1
jne 0x4239b0
mov eax, 1
jmp 0x42395d
lea eax, [esp + 0x3c]
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esi + eax], 0
add eax, 4
cmp eax, 0x20
jb 0x4239ea
lea eax, [esp + 0x38]
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp + 0x264], 2
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x2c8]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
sub esp, 0x10
test eax, eax
je 0x423ad5
cmp byte [esp + 0x2c], 0
je 0x423b08
mov edx, dword [ebx + 0x2c8]
mov byte [esp + 0x61], 0
mov ebp, 0xff
mov byte [esp + 0x62], 0
mov byte [esp + 0x63], 0
mov byte [esp + 0x64], 1
mov dword [esp], edx
mov dword [esp + 0x2c], edx
call sym._strlen
mov edx, dword [esp + 0x2c]
cmp eax, 0xff
mov dword [esp + 0x14], 0xc48
cmovle ebp, eax
lea eax, [esp + 0x5d]
mov dword [esp + 0x10], str.socks4_negotiate
mov dword [esp + 8], ebp
mov dword [esp + 0xc], str.util.c
mov dword [esp + 4], edx
lea edx, [esp + 0x6d]
mov dword [esp + 0x2c], eax
mov dword [esp], edx
call sym.__cg_memcpy
mov eax, dword [esp + 0x2c]
mov byte [esp + ebp + 0x6d], 0
add ebp, 0x11
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebp
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_send]
sub esp, 0x10
jmp 0x4238cb
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 4]
mov dword [esp], eax
call ebp
sub esp, 4
mov edx, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
mov dword [esp], edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
sub esp, 4
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
jne 0x423888
cmp byte [0x745ef7], 0
jne 0x423b28
cmp byte [0x732fa0], 0
jne 0x423b28
mov edx, dword [0x5bc2e0]
test edx, edx
jle 0x42395b
mov eax, dword [ebx + 0x2c8]
mov dword [esp + 8], str.Invalid_IP_address_specified_for_socks4_proxy:__s
mov dword [esp + 4], 0xa00
mov dword [esp], esi
mov dword [esp + 0xc], eax
call sym._snprintf_1
jmp 0x423943