Function at 0x415e70
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get file size
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x40
mov eax, dword [0x4bc7b8]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebx
push ebp
push esi
push edi
mov esi, ecx
push str.BurnNandFlashForNtwk
mov dword [esp + 0x18], esi
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x30]
mov ebx, eax
push ecx
push ebx
push str.BurnNandFlashForNtwk_bin_file_size__0x_x__highwd0x_x
mov dword [esp + 0x28], ebx
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 0xc
push str.malloc
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push ebx
call fcn.00468b45
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x28], ebp
jne 0x415f08
push str.Malloc_failed:_return_ERROR_NOT_ENOUGH_MEMORY
call fcn.00426a70
mov edi, eax
call fcn.00426f90
lea eax, [ebp + 8]
jmp 0x4164ad
push 0x49c9dc
mov esi, ebp
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov eax, dword [esp + 0x18]
add esp, 4
push 0
lea edx, [esp + 0x3c]
push edx
push ebx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x416497
cmp dword [esp + 0x38], ebx
jne 0x416497
mov ecx, dword [ebp]
mov ebx, dword [sym.imp.WS2_32.dll_htonl]
push ecx
call ebx
cmp eax, 0x4e414e44
je 0x415f72
push str.ERROR:_This_is_not_a_Nand_flash_bin_file
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov eax, 1
jmp 0x4164ad
mov eax, dword [ebp + 8]
lea edx, [ebp + 0xc]
push eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x24], edx
call ebx
mov ecx, dword [ebp + 4]
push ecx
mov dword [esp + 0x28], eax
call ebx
mov edx, dword [ebp + 4]
mov edi, eax
and edi, 0x7fffffff
push edx
mov dword [esp + 0x18], edi
call ebx
shr eax, 0x1f
mov dword [esp + 0x34], eax
je 0x415fca
push edi
call ebx
push str.NAND_PKG_sending_NO_REBOOT
mov dword [ebp + 4], eax
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov edi, dword [esp + 0x18]
add esp, 4
cmp edi, 0x81
mov dword [esp + 0x54], 0x101
jne 0x416035
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edi, dword [esp + 0x24]
push ecx
mov dword [esp + 0x1c], edi
call ebx
mov edx, dword [esp + 0x20]
mov esi, eax
mov eax, dword [edx + 4]
push eax
add esi, ebp
call ebx
mov ecx, dword [esi + 8]
push ecx
mov dword [esp + 0x20], eax
call ebx
mov edx, dword [esi + 4]
push edx
mov dword [esp + 0x28], eax
call ebx
push edi
push str.NAND_PKG_of__d
mov dword [esp + 0x1c], eax
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
cmp dword [esp + 0x18], 1
jbe 0x416035
mov dword [esp + 0x54], 0x2101
call fcn.00415940
test eax, eax
ja 0x41607a
push str.socket
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x416091
push esi
call fcn.00468c08
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004677d8
add esp, 0x40
ret 4
push 4
lea eax, [esp + 0x30]
push eax
push 0x1006
push 0xffff
push ebp
mov dword [esp + 0x40], 0x4e20
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x416074
push 0x4c4540
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x238c
mov dword [esp + 0x44], eax
mov word [esp + 0x40], 2
call dword [sym.imp.WS2_32.dll_htons]
push str.Socket_connection_created...
mov word [esp + 0x42], ax
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push 0x10
lea ecx, [esp + 0x40]
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_connect]
cmp dword [esp + 0x18], 0
je 0x416370
mov eax, dword [esp + 0x14]
cmp eax, 2
jne 0x4163a1
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4162ef
push eax
push str.Burning_NAND_package:__d_entries
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
push str.Calculating_checksum
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov edx, dword [esp + 0x20]
add esp, 4
push edx
mov eax, esi
call fcn.0040ce80
add esp, 4
cmp dword [esp + 0x34], 0
mov dword [esp + 0x14], eax
je 0x41616c
or dword [esp + 0x54], 0x2000
mov edi, dword [sym.imp.WS2_32.dll_htons]
xor eax, eax
push 0xac
mov dword [0x4c4a98], eax
mov dword [0x4c4a9c], eax
mov dword [0x4c4aa0], eax
mov dword [0x4c4aa4], eax
call edi
push 0xf
mov word [0x4c4a98], ax
call edi
mov word [0x4c4a9a], ax
mov eax, dword [esp + 0x1c]
push eax
call ebx
mov ecx, dword [esp + 0x14]
push ecx
mov dword [0x4c4aa4], eax
call edi
mov edx, dword [esp + 0x54]
push edx
mov word [0x4c4a9e], ax
call edi
push str.Sending_the_PJL_command_for_Bin_File_Downloading...
mov word [0x4c4a9c], ax
mov dword [0x4c4aa0], 0
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov edi, dword [sym.imp.WS2_32.dll_send]
add esp, 4
push 0
push 9
push 0x4972f0
push ebp
call edi
cmp eax, 0xffffffff
je 0x4163d0
cmp eax, 9
jne 0x41648d
push 0
push 0x19
push 0x4972fc
push ebp
call edi
cmp eax, 0xffffffff
je 0x4163d7
cmp eax, 0x19
jne 0x41648d
push 0
push 0x10
push 0x4c4a98
push ebp
call edi
cmp eax, 0xffffffff
je 0x4163de
cmp eax, 0x10
jne 0x41648d
mov eax, dword [esp + 0x1c]
push 0
push eax
push esi
push ebp
call edi
cmp eax, 0xffffffff
je 0x416412
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.Bin_file_downloaded_successfully...Getting_the_response
call fcn.00426a70
mov edi, eax
call fcn.00426f90
xor eax, eax
add esp, 4
push eax
push 0x10
push 0x4c4a88
push ebp
mov dword [0x4c4a88], eax
mov dword [0x4c4a8c], eax
mov dword [0x4c4a90], eax
mov dword [0x4c4a94], eax
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x416419
cmp eax, 0x10
jne 0x41643d
movzx ecx, word [0x4c4a88]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
push ecx
call esi
cmp ax, 0xac
jne 0x41645b
movzx edx, word [0x4c4a8a]
push edx
call esi
cmp ax, 0xf
jne 0x416462
movzx eax, word [0x4c4a8c]
push eax
call esi
cmp ax, 1
jne 0x416469
sub dword [esp + 0x18], 1
je 0x41635c
mov edi, dword [esp + 0x20]
mov ecx, dword [edi + 0xc]
add edi, 0xc
push ecx
mov dword [esp + 0x24], edi
call ebx
mov edx, dword [edi + 4]
mov esi, eax
add esi, dword [esp + 0x28]
push edx
call ebx
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 8]
push eax
call ebx
mov ecx, dword [esi + 4]
push ecx
mov dword [esp + 0x28], eax
call ebx
mov edx, dword [esp + 0x18]
push edx
push str.NAND_PKG_remaining__d
mov dword [esp + 0x1c], eax
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
cmp dword [esp + 0x18], 1
jne 0x416108
and dword [esp + 0x54], 0xdfff
jmp 0x416108
push str.BurnFlash_succeeded.
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00468c08
add esp, 4
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004677d8
add esp, 0x40
ret 4
push eax
push str.ERROR:_invalid_VERSION__d
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004677d8
add esp, 0x40
ret 4
push str.Could_not_send_PJL_UEL_to_the_socket...
jmp 0x41641e
push str.Could_not_send_PJL_ENTERLANG_to_the_socket...
jmp 0x4163e3
push str.Could_not_send_acl_cmd_to_the_socket...
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push 0
push 9
push 0x4972f0
push ebp
call dword [sym.imp.WS2_32.dll_send]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, dword [esp + 0x28]
push eax
jmp 0x416375
push str.Could_not_send_bin_file_to_the_socket...
jmp 0x41641e
push str.Could_not_recv_acl_response_from_the_socket...
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, dword [esp + 0x28]
push eax
jmp 0x416375
push str.Failed_to_receive_data_from_Network.
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov eax, dword [esp + 0x2c]
add esp, 4
push eax
jmp 0x416375
push str.Failed_to_receive_correct_ACL_PREFIX_from_Network.
jmp 0x41646e
push str.Failed_to_receive_correct_ACLCMD_BURN_FLASH_from_Network.
jmp 0x41646e
push str.Failed_to_receive_correct_ACLCMD_STATUS_SUCCESS_from_Network.
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push 0
push 9
push 0x4972f0
push ebp
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [esp + 0x28]
push eax
jmp 0x416375
push str.Read_bin_file_failed
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov eax, 0x145
mov ecx, dword [esp + 0x50]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004677d8
add esp, 0x40
ret 4