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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x101a0dcb
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x10279264]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push esi
push edi
mov eax, dword [0x10279264]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
xor edi, edi
mov ebx, ecx
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], eax
cmp esi, edi
je 0x1001fcc5
cmp eax, edi
je 0x1001fcc5
mov dword [ebx + 0x40], eax
cmp dword [esi + 0x70], edi
setne cl
mov byte [ebx + 0x69], cl
mov eax, dword [esi + 0x5c]
cmp eax, edi
jne 0x1001f43c
push str.DA_HANDLE_is_NULL_
lea edi, [esp + 0x2c]
mov dword [esp + 0x2c], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x30], 0x503
mov byte [esp + 0x34], 0xff
mov dword [esp + 0x38], str._ERROR:
mov dword [esp + 0x3c], str.BRom_MT6276::Boot_FlashTool
call fcn.10017c90
add esp, 4
mov eax, 0x138b
jmp 0x1001fcca
push 1
add eax, 0x3880
push eax
lea edx, [esp + 0x114]
push edx
mov ecx, str.Boot_FlashTool__:
call fcn.1012d180
push edi
mov dword [esp + 0x144], edi
mov ecx, dword [esi + 0x5c]
push edi
call fcn.100e87e0
cmp eax, edi
je 0x1001f4d8
push eax
push eax
mov dword [esp + 0x30], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x34], 0x50c
mov byte [esp + 0x38], 0xff
mov dword [esp + 0x3c], str._ERROR:
mov dword [esp + 0x40], str.BRom_MT6276::Boot_FlashTool
call sym.FlashToolLib.v1.dll_StatusToString
push eax
mov eax, dword [esi + 0x5c]
push eax
push str.DA_HANDLE_0x_08X__is_not_ready_to_download____s___d_.
lea edi, [esp + 0x38]
call fcn.10017c90
mov ecx, dword [esi + 0x5c]
add esp, 0x10
push ecx
call fcn.100e9710
lea edx, [esp + 0x10c]
push edx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0x138b
jmp 0x1001fcca
mov eax, dword [esi + 0x5c]
push eax
call fcn.100e9710
cmp byte [ebx + 0x69], 0
mov dword [ebx + 0x50], edi
mov dword [esp + 0x28], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov byte [esp + 0x30], 0
mov dword [esp + 0x34], str._DEBUG:
mov dword [esp + 0x38], str.BRom_MT6276::Boot_FlashTool
lea edi, [esp + 0x28]
je 0x1001f51a
mov dword [esp + 0x2c], 0x518
push str.Cable_Type___USB
jmp 0x1001f527
mov dword [esp + 0x2c], 0x51b
push str.Cable_Type___UART
call fcn.10017c90
add esp, 4
push str.SV5_starts...
lea edi, [esp + 0x2c]
mov dword [esp + 0x2c], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x30], 0x51e
mov byte [esp + 0x34], 0
mov dword [esp + 0x38], str._DEBUG:
mov dword [esp + 0x3c], str.BRom_MT6276::Boot_FlashTool
call fcn.10017c90
mov ecx, dword [esi + 0x28]
mov dword [ebx + 0x5c], ecx
mov edx, dword [esi + 0x2c]
mov dword [ebx + 0x60], edx
mov eax, dword [esi + 0x30]
mov dword [ebx + 0x64], eax
mov eax, dword [esi + 0x14]
add esp, 4
test eax, eax
je 0x1001f631
push eax
push str.CALLBACK_COM_INIT_STAGE_0x_08X_....
lea edi, [esp + 0x30]
mov dword [esp + 0x30], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x34], 0x529
mov byte [esp + 0x38], 0
mov dword [esp + 0x3c], str._DEBUG:
mov dword [esp + 0x40], str.BRom_MT6276::Boot_FlashTool
call fcn.10017c90
mov ecx, dword [esi + 0x18]
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x14]
add esp, 8
push ecx
push edx
call eax
mov edx, eax
test edx, edx
je 0x1001f631
push edx
mov dword [esp + 0x2c], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x30], 0x52c
mov byte [esp + 0x34], 0xff
mov dword [esp + 0x38], str._ERROR:
mov dword [esp + 0x3c], str.BRom_MT6276::Boot_FlashTool
call sym.FlashToolLib.v1.dll_StatusToString
mov ecx, dword [esi + 0x14]
push eax
push edx
push ecx
push str.CALLBACK_COM_INIT_STAGE_0x_08X_:_ret__d_.__s
lea edi, [esp + 0x38]
call fcn.10017c90
add esp, 0x10
lea edx, [esp + 0x10c]
push edx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0x13b5
jmp 0x1001fcca
mov eax, dword [esp + 0x58]
mov edx, dword [ebx]
mov edx, dword [edx + 0xd0]
add eax, 0x31
push eax
mov eax, dword [esp + 0x14]
push eax
mov ecx, ebx
call edx
mov edx, dword [ebx]
mov edx, dword [edx + 0x118]
test eax, eax
sete al
mov byte [esp + 0x3c], al
mov eax, dword [esp + 0x10]
push eax
mov ecx, ebx
call edx
lea eax, [esp + 0x10]
push eax
mov ecx, ebx
lea edi, [esp + 0x4c]
call fcn.10013cd0
mov byte [esp + 0x140], 1
cmp byte [esp + 0x51], 0
jne 0x1001f718
mov byte [esp + 0x140], 0
call fcn.10013d80
cmp byte [ebp + 0x18], 0
jne 0x1001f6f6
mov eax, dword [ebx + 0x44]
test eax, eax
je 0x1001f6a9
cmp dword [eax], 0x2694
je 0x1001f6f6
mov eax, dword [ebx + 0x50]
cmp dword [ebx + 0x4c], eax
jbe 0x1001f6f6
inc eax
push 0x7e9
push eax
push str.__p_:_fail__ret__d___go_to_retry_...
lea edi, [esp + 0x20]
mov dword [ebx + 0x50], eax
mov dword [esp + 0x20], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x24], 0x5ed
mov byte [esp + 0x28], 0xd2
mov dword [esp + 0x2c], str._WARN:
mov dword [esp + 0x30], str.BRom_MT6276::Boot_FlashTool
call fcn.10017c90
add esp, 0xc
jmp 0x1001f631
lea ecx, [esp + 0x10c]
push ecx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0x7e9
jmp 0x1001fcca
push ebx
call fcn.10134160
add esp, 4
lea edx, [esp + 0x40]
push edx
mov ecx, eax
call fcn.10023f40
mov byte [esp + 0x140], 2
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
push esi
mov esi, dword [esp + 0x14]
push eax
push ecx
mov ecx, dword [esp + 0x64]
call fcn.10134190
mov esi, eax
xor edi, edi
cmp esi, edi
jne 0x1001fc3f
mov esi, dword [esp + 0x54]
mov eax, dword [esi + 0x1c]
cmp eax, edi
je 0x1001f7f2
push eax
mov eax, dword [esp + 0x14]
push eax
push str.__p_:_invoke_m_cb_in_brom_stage_0x_08X__callback_function_...
lea edi, [esp + 0x20]
mov dword [esp + 0x20], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x24], 0x560
mov byte [esp + 0x28], 0
mov dword [esp + 0x2c], str._DEBUG:
mov dword [esp + 0x30], str.BRom_MT6276::Boot_FlashTool
call fcn.10017c90
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x1c]
add esp, 0xc
push ecx
push edx
push ebx
call eax
mov dword [esp + 0x14], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x24], str.BRom_MT6276::Boot_FlashTool
lea edi, [esp + 0x14]
test eax, eax
jne 0x1001f8a4
push str.m_cb_in_brom_stage_run_success
mov dword [esp + 0x1c], 0x563
mov byte [esp + 0x20], al
mov dword [esp + 0x24], str._DEBUG:
call fcn.10017c90
add esp, 4
xor edi, edi
movzx eax, word [ebx + 0x10]
mov ecx, dword [esi + 0x5c]
lea edx, [esp + 0x3c]
push edx
push eax
mov ax, word [ebx + 0xe]
push ecx
mov cx, word [ebx + 0xc]
mov dword [esp + 0x48], edi
call fcn.100e9410
cmp eax, edi
je 0x1001f90b
push eax
push eax
mov dword [esp + 0x1c], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x20], 0x574
mov byte [esp + 0x24], 0xff
mov dword [esp + 0x28], str._ERROR:
mov dword [esp + 0x2c], str.BRom_MT6276::Boot_FlashTool
call sym.FlashToolLib.v1.dll_StatusToString
mov edx, dword [esi + 0x5c]
push eax
mov eax, dword [esp + 0x18]
push edx
push eax
push str.__p_:_DA_HANDLE_0x_08X_::SearchDA__:_failed____s___d_.
lea edi, [esp + 0x28]
call fcn.10017c90
add esp, 0x14
lea eax, [esp + 0x40]
mov byte [esp + 0x140], 1
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea ecx, [esp + 0x10c]
push ecx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0x138b
jmp 0x1001fcca
push eax
push str.m_cb_in_brom_stage_return_fail_:__ret__0x_x
mov dword [esp + 0x20], 0x565
mov byte [esp + 0x24], 0xff
mov dword [esp + 0x28], str._ERROR:
call fcn.10017c90
add esp, 8
lea eax, [esp + 0x40]
mov byte [esp + 0x140], 1
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea ecx, [esp + 0x10c]
push ecx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0xc0060006
jmp 0x1001fcca
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 0x1c]
sub ecx, dword [eax + 0x18]
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0xa
jbe 0x1001f9d2
push 0x7ec
push 0x7ec
mov dword [esp + 0x1c], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x20], 0x57c
mov byte [esp + 0x24], 0xff
mov dword [esp + 0x28], str._ERROR:
mov dword [esp + 0x2c], str.BRom_MT6276::Boot_FlashTool
call sym.FlashToolLib.v1.dll_StatusToString
mov ecx, dword [esp + 0x40]
movzx edx, word [ecx + 0xa]
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [esi + 0x5c]
push 0xa
push str.BROM_MAX_DATA_BLOCKS
push edx
push eax
push ecx
push str.__p_:_DA_HANDLE_0x_08X___DA__d_s_load_regions_count_exceeds_the__s__d_____s___d_.
lea edi, [esp + 0x34]
call fcn.10017c90
add esp, 0x20
lea eax, [esp + 0x40]
mov byte [esp + 0x140], 1
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea edx, [esp + 0x10c]
push edx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0x7ec
jmp 0x1001fcca
movzx ecx, word [ebx + 0xe]
mov eax, dword [esi + 0x5c]
mov edx, dword [eax + 0x3848]
push ecx
mov cx, word [ebx + 0x10]
lea eax, [esp + 0x60]
push eax
call fcn.1006e7c0
mov byte [esp + 0x140], 3
mov ecx, dword [esp + 0x5c]
lea eax, [esp + 0x28]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov edx, dword [ecx]
mov edx, dword [edx + 4]
push eax
push 1
call edx
cmp eax, edi
mov dword [esp + 0x54], eax
mov dword [esp + 0x14], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x24], str.BRom_MT6276::Boot_FlashTool
lea edi, [esp + 0x14]
je 0x1001faae
push str.Query_DA_region_failed_
mov dword [esp + 0x1c], 0x5ba
mov byte [esp + 0x20], 0xff
mov dword [esp + 0x24], str._ERROR:
call fcn.10017c90
add esp, 4
lea eax, [esp + 0x5c]
mov byte [esp + 0x140], 2
call fcn.101008e0
lea eax, [esp + 0x40]
mov byte [esp + 0x140], 1
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea eax, [esp + 0x10c]
push eax
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, dword [esp + 0x54]
jmp 0x1001fcca
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x10]
mov ecx, 1
mov word [esp + 0x64], cx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x38]
push eax
push str.__p_:_BRom_WriteBuf___...
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x20], 0x5c6
mov byte [esp + 0x24], 0
mov dword [esp + 0x28], str._DEBUG:
call fcn.10017c90
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x68]
mov edx, dword [ebx]
mov edx, dword [edx + 0xa8]
add esp, 8
push eax
mov eax, dword [esi + 0x64]
push ecx
mov ecx, dword [esi + 0x60]
push eax
push ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x74]
push eax
push ecx
mov ecx, ebx
call edx
test eax, eax
je 0x1001fbd2
cmp eax, 0x7e4
mov byte [esp + 0x140], 2
lea eax, [esp + 0x5c]
jne 0x1001fb89
call fcn.101008e0
lea eax, [esp + 0x40]
mov byte [esp + 0x140], 1
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea eax, [esp + 0x10c]
push eax
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0x7e4
jmp 0x1001fcca
call fcn.101008e0
lea eax, [esp + 0x40]
mov byte [esp + 0x140], 1
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea ecx, [esp + 0x10c]
push ecx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, 0x7d4
jmp 0x1001fcca
mov edx, dword [esp + 0x10]
push edx
push str.__p_:_BRom_WriteBuf___Pass_
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov dword [esp + 0x20], 0x5d0
mov byte [esp + 0x24], 0
mov dword [esp + 0x28], str._DEBUG:
mov dword [esp + 0x2c], str.BRom_MT6276::Boot_FlashTool
call fcn.10017c90
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x18]
add esp, 8
push eax
push ecx
mov ecx, dword [esp + 0x44]
lea ebx, [esp + 0x30]
call fcn.10134b40
mov esi, eax
mov byte [esp + 0x140], 2
lea eax, [esp + 0x5c]
test esi, esi
je 0x1001fc7d
call fcn.101008e0
lea eax, [esp + 0x40]
mov byte [esp + 0x140], 1
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea edx, [esp + 0x10c]
push edx
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
mov eax, esi
jmp 0x1001fcca
mov bl, 1
mov byte [esp + 0x50], bl
call fcn.101008e0
lea eax, [esp + 0x40]
mov byte [esp + 0x140], bl
call fcn.101008e0
lea edi, [esp + 0x48]
mov byte [esp + 0x140], 0
call fcn.10013d80
lea eax, [esp + 0x10c]
push eax
mov dword [esp + 0x144], 0xffffffff
call fcn.1012d310
xor eax, eax
jmp 0x1001fcca
mov eax, 0x3ea
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.1016cb16
mov esp, ebp
pop ebp
ret 0x18