Function at 0x1013a610
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1019743d
mov eax, dword fs:[0]
push eax
sub esp, 0x608
mov eax, dword [0x10279264]
xor eax, esp
mov dword [esp + 0x600], eax
push ebx
push esi
push edi
mov eax, dword [0x10279264]
xor eax, esp
push eax
lea eax, [esp + 0x618]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor eax, eax
mov ebx, ecx
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, 0xaf3addc7
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
lea esi, [edx + eax - 1]
mov dword [esp + 0x1c], ebx
test esi, esi
jl 0x1013a7d3
mov ebx, esi
imul ebx, ebx, 0x5d8
mov edi, edi
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
mov eax, 0xaf3addc7
imul ecx
add edx, ecx
sar edx, 0xa
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp esi, ecx
jb 0x1013a6b2
call fcn.1016d669
mov eax, dword [edi + 0xc]
push 4
add eax, ebx
push str._RSV
push eax
call fcn.100192e0
cmp eax, 0xffffffff
je 0x1013a6d9
dec esi
sub ebx, 0x5d8
test esi, esi
jge 0x1013a690
jmp 0x1013a7cf
test esi, esi
jl 0x1013a7cf
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
mov eax, 0xaf3addc7
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x1013a703
call fcn.1016d669
imul esi, esi, 0x5d8
add esi, dword [edi + 0xc]
lea ecx, [esp + 0x34]
push esi
push ecx
call fcn.10049f90
mov dword [esp + 0x620], 0
cmp dword [esp + 0x4c], 0x10
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jae 0x1013a741
lea edx, [esp + 0x38]
mov esi, dword [esp + 0x450]
push esi
mov esi, dword [esp + 0x450]
push esi
push edx
mov edx, dword [esp + 0x8c]
push edx
mov edx, dword [esp + 0x8c]
push edx
push ecx
push eax
push str.m_begin_addr0X_016I64X_m_end_addr__0X_016I64X_m_name___s_m_len__0X_X
lea edi, [esp + 0x40]
mov dword [esp + 0x40], str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
mov dword [esp + 0x44], 0x42
mov byte [esp + 0x48], 0
mov dword [esp + 0x4c], str._DEBUG:
mov dword [esp + 0x50], str.CNANDStorageSizeCheck::IsStorageSizeEnough
call fcn.10017c90
add esp, 0x20
cmp byte [esp + 0x5ec], 0
je 0x1013a7ba
mov eax, dword [esp + 0x44c]
add dword [esp + 0x14], eax
mov ecx, dword [esp + 0x450]
adc dword [esp + 0x18], ecx
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x624], 0xffffffff
call fcn.1004a030
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
push esi
push eax
push ecx
push edx
push str.StorageSize0X_016I64X_u64LastImgEndAddr__0X_016I64X
lea edi, [esp + 0x34]
mov dword [esp + 0x34], str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
mov dword [esp + 0x38], 0x48
mov byte [esp + 0x3c], 0
mov dword [esp + 0x40], str._DEBUG:
mov dword [esp + 0x44], str.CNANDStorageSizeCheck::IsStorageSizeEnough
call fcn.10017c90
mov eax, dword [ebx + 0xc]
add esp, 0x14
cmp eax, esi
ja 0x1013a834
jb 0x1013a82d
mov ecx, dword [ebx + 8]
cmp ecx, dword [esp + 0x14]
jae 0x1013a834
mov eax, 0x3f3
jmp 0x1013a86c
push 0x10201619
lea edi, [esp + 0x24]
mov dword [esp + 0x24], str.FlashToolLib_sv5_common_generic_src_StorageSizeCheck.cpp
mov dword [esp + 0x28], 0x4c
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], str._DEBUG:
mov dword [esp + 0x34], str.CNANDStorageSizeCheck::IsStorageSizeEnough
call fcn.10017c90
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x618]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x600]
xor ecx, esp
call fcn.1016cb16
mov esp, ebp
pop ebp
ret 4