Function at 0x1013ad70
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x10197400
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x10279264]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10279264]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x594]
lea ebp, [esi + 0x3f8]
xor ecx, ecx
add eax, dword [ebp + 0x1b0]
lea edi, [esp + 0x18]
adc ecx, dword [ebp + 0x1b4]
mov dword [esp + 0x18], str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
push ecx
push eax
push str.romFileInfo.m_flu.m_sec_start_off_d.
mov dword [esp + 0x28], 0xa3
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], str._DEBUG:
mov dword [esp + 0x34], str.CEMMCStorageSizeCheck::GetRomFileRealLen
call fcn.10017c90
mov ecx, dword [esi + 0x41c]
mov eax, dword [esi + 0x418]
add esp, 0xc
push 0xffffffffffffffff
xor edi, edi
push edi
mov dword [esp + 0x38], ecx
push ebp
lea ecx, [esp + 0x4c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], edi
mov byte [esp + 0x50], 0
call fcn.10004b90
push 0x1c
mov dword [esp + 0x6c], edi
call fcn.1016bba0
mov ebx, eax
add esp, 4
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x68], 1
mov ecx, dword [esi + 0x540]
mov eax, dword [esi + 0x538]
push ecx
push eax
push str.CALLBACK_REMOTE_GET_FILE_LEN_0x_08X___CALLBACK_REMOTE_READ_FILE_0x_08X_.
lea edi, [esp + 0x24]
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x24], str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
mov dword [esp + 0x28], 0xad
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], str._DEBUG:
mov dword [esp + 0x34], str.CEMMCStorageSizeCheck::GetRomFileRealLen
call fcn.10017c90
mov eax, dword [esp + 0x50]
add esp, 0xc
cmp dword [esp + 0x58], 0x10
jae 0x1013ae9e
lea eax, [esp + 0x44]
push eax
call fcn.100ee190
add esp, 4
test al, al
je 0x1013af67
cmp dword [esp + 0x38], 0
je 0x1013af67
mov edi, dword [esp + 0x34]
test edi, edi
je 0x1013af67
cmp dword [esp + 0x58], 0x10
mov esi, dword [esi + 0x544]
mov eax, dword [esp + 0x44]
jae 0x1013aedb
lea eax, [esp + 0x44]
push esi
push 0x1c
push ebx
push eax
call edi
mov esi, str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
mov ebp, str.CEMMCStorageSizeCheck::GetRomFileRealLen
test eax, eax
je 0x1013b026
push eax
push edi
push str.CALLBACK_REMOTE_READ_FILE_0x_08X_:_ret__d_.
lea edi, [esp + 0x24]
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 0xb2
mov byte [esp + 0x2c], 0xff
mov dword [esp + 0x30], str._ERROR:
mov dword [esp + 0x34], ebp
call fcn.10017c90
mov eax, dword [esp + 0x50]
add esp, 0xc
cmp dword [esp + 0x58], 0x10
jae 0x1013af33
lea eax, [esp + 0x44]
push eax
push str.fail_to_read_file_from___s_____
lea edi, [esp + 0x20]
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], 0xb3
mov byte [esp + 0x28], 0xff
mov dword [esp + 0x2c], str._ERROR:
mov dword [esp + 0x30], ebp
call fcn.10017c90
add esp, 8
jmp 0x1013b026
cmp dword [esp + 0x58], 0x10
mov eax, dword [esp + 0x44]
jae 0x1013af76
lea eax, [esp + 0x44]
push 0x1022acf8
push eax
call fcn.1016f9bf
mov esi, eax
add esp, 8
test esi, esi
jne 0x1013afea
push str._fopen_fail_S_INVALID_ARGUMENTS
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
mov dword [esp + 0x20], 0xbb
mov byte [esp + 0x24], 0xff
mov dword [esp + 0x28], str._ERROR:
mov dword [esp + 0x2c], str.CEMMCStorageSizeCheck::GetRomFileRealLen
call fcn.10017c90
add esp, 4
push ebx
call fcn.1016dfc5
add esp, 4
cmp dword [esp + 0x58], 0x10
jb 0x1013afdd
mov edx, dword [esp + 0x44]
push edx
call fcn.1016d679
add esp, 4
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
jmp 0x1013b10a
mov eax, dword [ebp + 0x19c]
xor ecx, ecx
add eax, dword [ebp + 0x1b0]
push 0
adc ecx, dword [ebp + 0x1b4]
push ecx
push eax
push esi
call fcn.10170c90
push esi
push 0x1c
push 1
push ebx
call fcn.10170626
push esi
call fcn.1016f172
add esp, 0x24
mov ebp, str.CEMMCStorageSizeCheck::GetRomFileRealLen
mov esi, str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
push 0x1c
push ebx
push str.strSparseHeadContent_s_nSparseLen_u
lea edi, [esp + 0x24]
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 0xc5
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], str._DEBUG:
mov dword [esp + 0x34], ebp
call fcn.10017c90
add esp, 0xc
test ebx, ebx
je 0x1013b0e1
cmp dword [ebx], 0xed26ff3a
jne 0x1013b0e1
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
push edx
push eax
push str.SPARSE_HEADER_MAGIC_pSparseHead__total_blks_d_pSparseHead__blk_sz_d
lea edi, [esp + 0x24]
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 0xc9
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], str._DEBUG:
mov dword [esp + 0x34], ebp
call fcn.10017c90
mov eax, dword [ebx + 0x10]
mul dword [ebx + 0xc]
add esp, 0xc
mov ebp, edx
mov esi, eax
push ebp
push esi
push str.SPARSE_HEADER_MAGIC_u64SparseFileLen0X_016I64X
lea edi, [esp + 0x24]
mov dword [esp + 0x24], str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
mov dword [esp + 0x28], 0xcb
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], str._DEBUG:
mov dword [esp + 0x34], str.CEMMCStorageSizeCheck::GetRomFileRealLen
call fcn.10017c90
add esp, 0xc
jmp 0x1013b0e9
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
push ebx
call fcn.1016dfc5
add esp, 4
cmp dword [esp + 0x58], 0x10
jb 0x1013b106
mov ecx, dword [esp + 0x44]
push ecx
call fcn.1016d679
add esp, 4
mov eax, esi
mov edx, ebp
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.1016cb16
add esp, 0x58
ret