Function at 0x4159b0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x420
mov eax, dword [0x4bc7b8]
xor eax, esp
mov dword [esp + 0x418], eax
push ebx
push esi
push edi
push 0x3ff
lea eax, [esp + 0x25]
push 0
push eax
mov byte [esp + 0x2c], 0
call fcn.0046adc0
add esp, 0xc
push str.GetNtwkPrinterFWVer__
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
call fcn.00415940
test eax, eax
ja 0x415a37
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x415a51
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.socket___failed__gle_d_
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
push 4
lea ecx, [esp + 0x10]
push ecx
push 0x1006
push 0xffff
push esi
mov dword [esp + 0x20], 0x1f40
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x415ab0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.setsockopt_failed__gle_d_
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
push 0x4c4540
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, dword [sym.imp.WS2_32.dll_htons]
push 0x238c
mov dword [esp + 0x18], eax
mov word [esp + 0x14], 2
call edi
push 0x10
lea edx, [esp + 0x14]
push edx
push esi
mov word [esp + 0x1e], ax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x415b32
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_connect_to_the_socket__gle_d_
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
mov ebx, dword [sym.imp.WS2_32.dll_send]
push 0
push 9
push 0x4972f0
push esi
call ebx
cmp eax, 0xffffffff
jne 0x415b91
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_send_PJL_UEL_to_the_socket__gle_d_
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
cmp eax, 9
jne 0x415e05
push 0
push 0x19
push 0x4972fc
push esi
call ebx
cmp eax, 0xffffffff
jne 0x415bf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_send_PJL_ENTERLANG_to_the_socket__gle_d_
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
cmp eax, 0x19
jne 0x415e05
xor eax, eax
push 0xac
mov dword [0x4c4a98], eax
mov dword [0x4c4a9c], eax
mov dword [0x4c4aa0], eax
mov dword [0x4c4aa4], eax
call edi
push 1
mov word [0x4c4a98], ax
call edi
push 0
push 0x10
push 0x4c4a98
push esi
mov word [0x4c4a9a], ax
call ebx
cmp eax, 0xffffffff
jne 0x415c44
push str.Could_not_send_acl_cmd_to_the_socket..._r_n
jmp 0x415dc4
cmp eax, 0x10
jne 0x415e05
xor eax, eax
push str.GetNtwkPrinterFWVer__:_Getting_fw_version..._r_n
mov dword [0x4c4a88], eax
mov dword [0x4c4a8c], eax
mov dword [0x4c4a90], eax
mov dword [0x4c4a94], eax
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push 0
push 0x10
push 0x4c4a88
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x415c96
push str.Failed_to_get_Firmware_Version..._r_n
jmp 0x415dc4
cmp eax, 0x10
jne 0x415e05
movzx eax, word [0x4c4a88]
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
push eax
call edi
cmp ax, 0xac
je 0x415cf0
push str.prefix___ACL_PREFIX
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
movzx ecx, word [0x4c4a8a]
push ecx
call edi
cmp ax, 1
je 0x415d3b
push str.cmdID___ACLCMD_GET_VERSION
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
movzx edx, word [0x4c4a8c]
push edx
call edi
cmp ax, 1
je 0x415d86
push str.cmdStatus___ACLCMD_STATUS_SUCCESS
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
push 0x400
lea eax, [esp + 0x24]
push 0
push eax
call fcn.0046adc0
mov ecx, dword [0x4c4a8e]
mov edx, dword [0x4c4a92]
add esp, 0xc
push 0
push 9
push 0x4972f0
push esi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
call ebx
cmp eax, 0xffffffff
jne 0x415e00
push str.Failed_to_send_data_to_Printer._r_n
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
cmp eax, 9
je 0x415e2c
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret
lea eax, [esp + 0x20]
push eax
call fcn.004680ef
add esp, 4
push esi
mov edi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x424]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004677d8
add esp, 0x420
ret