Function at 0x40c720
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
push str.BurnNandFlash
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov ecx, dword [esp + 0x44]
add esp, 4
lea eax, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [esp + 0x2c]
mov ebp, eax
push edx
push ebp
push str.BurnNandFlash_bin_file_size__0x_x__highwd0x_x
mov dword [esp + 0x20], ebp
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 0xc
push ebp
call fcn.00468b45
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x34], ebx
jne 0x40c789
lea eax, [ebx + 8]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov ecx, dword [esp + 0x40]
push 0
lea eax, [esp + 0x2c]
push eax
push ebp
push ebx
push ecx
mov esi, ebx
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40cbda
cmp dword [esp + 0x28], ebp
jne 0x40cbda
mov edx, dword [ebx]
mov ebp, dword [sym.imp.WS2_32.dll_htonl]
push edx
call ebp
cmp eax, 0x4e414e44
je 0x40c7ec
push str.ERROR:_This_is_not_a_Nand_flash_bin_file
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov eax, 1
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov ecx, dword [ebx + 8]
lea eax, [ebx + 0xc]
push ecx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x24], eax
call ebp
mov edx, dword [ebx + 4]
push edx
mov dword [esp + 0x28], eax
call ebp
mov edi, eax
mov eax, dword [ebx + 4]
and edi, 0x7fffffff
push eax
mov dword [esp + 0x20], edi
call ebp
shr eax, 0x1f
mov dword [esp + 0x30], eax
je 0x40c844
push edi
call ebp
push str.NAND_PKG_sending_NO_REBOOT
mov dword [ebx + 4], eax
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov edi, dword [esp + 0x20]
add esp, 4
cmp edi, 0x81
mov dword [esp + 0x44], 0x101
jne 0x40c8c4
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov edi, dword [esp + 0x24]
push edx
mov dword [esp + 0x1c], edi
call ebp
mov esi, eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 4]
push ecx
add esi, ebx
call ebp
mov edx, dword [esi + 8]
push edx
mov dword [esp + 0x18], eax
call ebp
mov dword [esp + 0x24], eax
mov eax, dword [esi + 4]
push eax
call ebp
push edi
push str.NAND_PKG_of__d
mov dword [esp + 0x24], eax
call fcn.00426a70
mov edi, eax
call fcn.00426f90
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, 1
jbe 0x40c8b1
mov dword [esp + 0x44], 0x2101
test eax, eax
je 0x40cb00
lea esp, [esp]
mov edi, dword [esp + 0x1c]
cmp edi, 2
jne 0x40cb13
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40ca81
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 ecx, dword [esp + 0x18]
add esp, 4
push ecx
mov eax, esi
call fcn.0040ce80
add esp, 4
cmp dword [esp + 0x30], 0
mov ebx, eax
je 0x40c922
or dword [esp + 0x44], 0x2000
mov edi, dword [sym.imp.WS2_32.dll_htons]
xor eax, eax
push 0xac
mov dword [0x4c4a74], eax
mov dword [0x4c4a78], eax
mov dword [0x4c4a7c], eax
mov dword [0x4c4a80], eax
call edi
push 0xf
mov word [0x4c4a74], ax
call edi
mov edx, dword [esp + 0x14]
push edx
mov word [0x4c4a76], ax
call ebp
push ebx
mov dword [0x4c4a80], eax
call edi
mov word [0x4c4a7a], ax
mov eax, dword [esp + 0x44]
push eax
call edi
mov ebx, dword [esp + 0x3c]
mov word [0x4c4a78], ax
push str.e__12345X
mov eax, 9
mov dword [0x4c4a7c], 0
call fcn.0040cc00
add esp, 4
cmp eax, 9
jne 0x40cb35
push str._PJL_ENTER_LANGUAGEACL_r_n
mov eax, 0x19
call fcn.0040cc00
add esp, 4
cmp eax, 0x19
jne 0x40cb3f
push 0x4c4a74
mov eax, 0x10
call fcn.0040cc00
add esp, 4
cmp eax, 0x10
jne 0x40cb5b
xor edi, edi
cmp dword [esp + 0x14], edi
jbe 0x40c9fc
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x3c]
lea ecx, [edi + esi]
sub eax, edi
push ecx
call fcn.0040cc00
add edi, eax
add esp, 4
cmp edi, dword [esp + 0x14]
jb 0x40c9de
mov ebx, dword [esp + 0x3c]
xor eax, eax
push 0x1d4c0
mov dword [0x4c4a64], eax
mov dword [0x4c4a68], eax
mov dword [0x4c4a6c], eax
mov dword [0x4c4a70], eax
push 0x4c4a64
push ebx
mov eax, 0x10
call fcn.0040cd20
add esp, 0xc
cmp eax, 0x10
mov dword [esp + 0x28], eax
jne 0x40cb74
movzx edx, word [0x4c4a64]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
push edx
call esi
cmp ax, 0xac
jne 0x40cb8f
movzx eax, word [0x4c4a66]
push eax
call esi
cmp ax, 0xf
jne 0x40cba8
movzx ecx, word [0x4c4a68]
push ecx
call esi
cmp ax, 1
jne 0x40cbc1
mov ebx, dword [esp + 0x34]
sub dword [esp + 0x18], 1
je 0x40caec
mov edi, dword [esp + 0x20]
mov edx, dword [edi + 0xc]
add edi, 0xc
push edx
mov dword [esp + 0x24], edi
call ebp
mov esi, eax
mov eax, dword [edi + 4]
push eax
add esi, ebx
call ebp
mov ecx, dword [esi + 8]
push ecx
mov dword [esp + 0x18], eax
call ebp
mov edx, dword [esi + 4]
push edx
mov dword [esp + 0x28], eax
call ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
push eax
push str.NAND_PKG_remaining__d
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 8
cmp dword [esp + 0x18], 1
jne 0x40c8c0
and dword [esp + 0x44], 0xdfff
jmp 0x40c8c0
push str.BurnFlash_succeeded.
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push ebx
call fcn.00468c08
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push edi
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
add esp, 0x28
ret
push str.Write__PJL_UEL_failed
jmp 0x40cbdf
push str.e__12345X
mov eax, 9
call fcn.0040cc00
add esp, 4
push str.Write__PJL_ENTERLANG_failed
jmp 0x40cbdf
push str.e__12345X
mov eax, 9
call fcn.0040cc00
add esp, 4
push str.Write__acl_cmd_failed
jmp 0x40cbdf
push str.BurnNandFlash__:_ReadData___Failed.
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
push str.Read__acl_response_failed
jmp 0x40cbdf
push str.e__12345X
mov eax, 9
call fcn.0040cc00
add esp, 4
push str.Read__acl_response_prefix___ACL_PREFIX
jmp 0x40cbdf
push str.e__12345X
mov eax, 9
call fcn.0040cc00
add esp, 4
push str.Read__acl_response_cmdID___ACLCMD_BURN_FLASH
jmp 0x40cbdf
push str.e__12345X
mov eax, 9
call fcn.0040cc00
add esp, 4
push str.Read__acl_response_status___ACLCMD_STATUS_SUCCESS
jmp 0x40cbdf
push str.Read_bin_file_failed
call fcn.00426a70
mov edi, eax
call fcn.00426f90
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x145
pop ebx
add esp, 0x28
ret