Function at 0x506f770
Capabilities:
Check for time delay via gettickcount

Disassembly:
push 0xffffffffffffffff
push 0x5221563
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x53f3c3c]
xor eax, esp
mov dword [esp + 0xa8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53f3c3c]
xor eax, esp
push eax
lea eax, [esp + 0xc0]
mov dword fs:[0], eax
mov eax, dword [esp + 0xd4]
mov esi, dword [esp + 0xd0]
mov ebp, ecx
mov ecx, dword [esp + 0xd8]
mov dword [esp + 0x18], ecx
lea ecx, [ebp + 0xc]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], eax
call fcn.051b3090
lea edi, [ebp + 0x4f4]
mov ecx, 0x26
lea ebx, [ebp + 0x338]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebx + 0x10]
cmp dword [ebx + 0xc], esi
jbe 0x506f7f7
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, dword [ebx + 0xc]
mov edx, dword [ebx]
mov dword [esp + 0x3c], edx
cmp edi, dword [ebx + 0x10]
jbe 0x506f80b
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x3c]
mov eax, dword [ebx]
push esi
push ecx
push edi
push eax
lea edx, [esp + 0x4c]
push edx
mov ecx, ebx
call fcn.0506c5d0
mov esi, dword [esp + 0x1c]
add esi, 4
xor edi, edi
cmp dword [esi], 0xff
je 0x506f85f
mov eax, dword [esi]
cmp eax, 0xa
jg 0x506f85f
push eax
push ebp
call fcn.05063de0
test eax, eax
jne 0x506f84c
push esi
mov ecx, ebx
call fcn.0506f4a0
mov eax, dword [esp + 0x1c]
inc edi
cmp dword [eax + edi*4 + 4], 0xff
lea esi, [eax + edi*4 + 4]
jne 0x506f832
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + 8], 0xff
mov edx, dword [ebx + 0x10]
setne byte [esp + 0x23]
sub edx, dword [ebx + 0xc]
test edx, 0xfffffffc
jne 0x506f8a1
xor esi, esi
nop
push esi
push ebp
call fcn.05063de0
test eax, eax
jne 0x506f89b
lea eax, [esp + 0x24]
push eax
mov ecx, ebx
mov dword [esp + 0x28], esi
call fcn.0506f4a0
inc esi
cmp esi, 0xa
jle 0x506f880
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp + 0x32d], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp + 0x328], 1
mov dword [ebp + 0x428], eax
mov esi, 0x525151c
je 0x506f8d2
mov esi, 0x5251518
push 0x52c722a
push 1
push 0x9d4
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0xc8], 0
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
mov ecx, dword [ebp]
push esi
push edx
mov edx, dword [ebp + 8]
push str.META_HANDLE::CheckAliveLoopByUart
push ecx
push str.__d___s_COM_d_:_TST_message_is__s_format.
push edx
push eax
call fcn.051ae2d0
or edi, 0xffffffff
add esp, 0x1c
mov dword [esp + 0xc8], edi
lea ecx, [esp + 0x28]
call fcn.051ae2c0
mov esi, 1
cmp dword [ebp + 0x330], esi
jne 0x506fa03
push 0x52c722a
push esi
push 0x9d8
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0xc8], esi
mov ecx, dword [ebp + 0x334]
mov edx, dword [ebp]
push ecx
mov ecx, dword [ebp + 8]
push str.META_HANDLE::CheckAliveLoopByUart
push edx
push str.__d___s_COM_d_:_disable_SW_flow_control_...
push ecx
push eax
call fcn.051ae2d0
add esp, 0x18
mov dword [esp + 0xc8], edi
lea ecx, [esp + 0x28]
call fcn.051ae2c0
lea edx, [esp + 0x48]
push edx
lea ecx, [ebp + 0xc]
call fcn.051b3200
test eax, eax
je 0x506f9b8
push 0x539d928
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 2
call sub.MSVCR90.dll__CxxThrowException
mov ecx, 7
lea esi, [esp + 0x48]
lea edi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x50]
and ecx, 0xfffffcb3
lea edx, [esp + 0x64]
mov dword [esp + 0x6c], ecx
push edx
lea ecx, [ebp + 0xc]
call fcn.051b32c0
test eax, eax
je 0x506f9fd
push 0x539d928
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 2
call sub.MSVCR90.dll__CxxThrowException
or edi, 0xffffffff
lea esi, [edi + 2]
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
sar ecx, 2
test ecx, ecx
ja 0x506fa16
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [ebx + 0xc]
mov eax, dword [edx]
push eax
push ebp
call fcn.05063de0
lea ecx, [ebp + 0xc]
call fcn.051b2fe0
test eax, eax
je 0x506fa37
push 0
push 0
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp + 0x328], esi
mov esi, 0x525151c
je 0x506fa49
mov esi, 0x5251518
push 0x52c722a
push 1
push 0x9fc
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0xc8], 2
mov ecx, dword [ebp + 0x334]
mov edx, dword [ebp]
push esi
push ecx
mov ecx, dword [ebp + 8]
push str.META_HANDLE::CheckAliveLoopByUart
push edx
push str.__d___s_COM_d_:_TST_message_is__s_format.
push ecx
push eax
call fcn.051ae2d0
add esp, 0x1c
mov dword [esp + 0xc8], edi
lea ecx, [esp + 0x28]
call fcn.051ae2c0
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
xor edi, edi
mov dword [esp + 0x24], edi
cmp eax, 0x2694
je 0x506fbff
jmp 0x506fac4
mov edi, dword [esp + 0x24]
cmp eax, 0xeeee
je 0x506ffc5
cmp byte [esp + 0x23], 0
je 0x506fb17
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
xor edx, edx
sar ecx, 2
mov eax, edi
div ecx
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
sar eax, 2
mov esi, edx
cmp esi, eax
jb 0x506fafa
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ecx + esi*4]
push edx
push ebp
call fcn.05063de0
lea ecx, [ebp + 0xc]
call fcn.051b2fe0
test eax, eax
jne 0x506fa2e
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x60], esp
push 0x52c722a
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov dword [esp + 0xe4], 4
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x74], esp
push 0x52c722a
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov byte [esp + 0x100], 5
lea eax, [ebp + 0x304]
push eax
mov dword [esp + 0x104], 0xffffffff
lea ecx, [esp + 0xbc]
call fcn.051aef90
mov dword [esp + 0xc8], 6
cmp dword [esp + 0xdc], 0
je 0x506fb9a
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
xor edx, edx
sar ecx, 2
mov eax, edi
div ecx
inc eax
imul eax, eax, 0x32
jmp 0x506fb9f
mov eax, 0xc8
mov edx, dword [ebp]
push 1
push eax
push edx
call sym.META_DLL.dll_META_WaitForTargetReady_r
mov esi, eax
mov dword [esp + 0xc8], 0xffffffff
lea ecx, [esp + 0x80]
call fcn.051af090
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
sub edi, dword [ebp + 0x428]
test esi, esi
je 0x506fc79
mov esi, dword [esp + 0x1c]
cmp dword [esi + 0x94], edi
jb 0x506ff48
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
inc dword [esp + 0x24]
cmp eax, 0x2694
jne 0x506fac0
push str._ERROR:
push 0xff
push 0xa04
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0xc8], 3
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x334]
push ecx
mov ecx, dword [ebp]
push edx
mov edx, dword [ebp + 8]
push str.META_HANDLE::CheckAliveLoopByUart
push ecx
push str.__d___s_COM_d_:_p_bootstop_0x_08X_BOOT_STOP.
push edx
push eax
call fcn.051ae2d0
add esp, 0x1c
mov dword [esp + 0xc8], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.051ae2c0
push 0x539d928
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 0x1d
call sub.MSVCR90.dll__CxxThrowException
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
mov eax, dword [esp + 0x24]
sar ecx, 2
xor edx, edx
div ecx
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
sar ecx, 2
mov esi, edx
cmp esi, ecx
jb 0x506fc9f
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [ebx + 0xc]
mov eax, dword [edx + esi*4]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov dword [esi], eax
cmp dword [ecx + 0x34], 1
jne 0x506fd56
push 0x52c722a
push 1
push 0xa32
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov ebx, eax
mov dword [esp + 0xc8], 8
mov edx, dword [esi]
push edx
call fcn.051a8dc0
mov ecx, dword [ebp]
mov edx, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0x334]
push eax
push str.META_HANDLE::CheckAliveLoopByUart
push ecx
push str.__d___s_COM_d_:_Final_baud_rate___d__re_enable_SW_flow_control_...
push edx
push ebx
call fcn.051ae2d0
add esp, 0x20
mov dword [esp + 0xc8], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.051ae2c0
mov eax, dword [esi]
push eax
call fcn.051a8dc0
add esp, 4
lea ecx, [esp + 0x48]
push ecx
lea ecx, [ebp + 0xc]
mov dword [esp + 0x50], eax
call fcn.051b32c0
test eax, eax
je 0x506fd56
push 0x539d928
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], 2
call sub.MSVCR90.dll__CxxThrowException
mov byte [ebp + 0x32d], 0
lea eax, [esi + 0xa0]
xor ecx, ecx
mov dword [esi + 4], 0
mov dword [eax], ecx
mov dword [eax + 4], ecx
push eax
mov dword [eax + 8], ecx
mov eax, dword [ebp]
push str.META_HANDLE::CheckAliveLoopByUart
push eax
mov ecx, ebp
call fcn.05062160
test eax, eax
je 0x506fd9c
push 0x539d928
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], eax
call sub.MSVCR90.dll__CxxThrowException
push 0x52c722a
push 1
push 0xa4b
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov ebx, eax
mov dword [esp + 0xc8], 9
mov edx, dword [esi + 4]
mov eax, dword [esi]
push edx
push eax
push eax
call sym.META_DLL.dll_META_BaudrateEnumToName
mov edx, dword [ebp]
push eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
push esi
push edi
push ecx
push str.META_HANDLE::CheckAliveLoopByUart
push edx
push str.__d___s_COM_d_:_OK___ms_total_bootup_time__lu___p_report_0x_08X__final_baudrate__s__d____meta_ver_required_by_target_0x_08X__.
push eax
push ebx
call fcn.051ae2d0
or esi, 0xffffffff
add esp, 0x2c
mov dword [esp + 0xc8], esi
lea ecx, [esp + 0x28]
call fcn.051ae2c0
mov ecx, dword [ebp]
push str.META_HANDLE::CheckAliveLoopByUart
push ecx
mov ecx, ebp
call fcn.05066b90
mov edx, dword [ebp]
push 1
push edx
mov ecx, ebp
call fcn.05063ff0
mov eax, dword [ebp]
push eax
push str.META_HANDLE::CheckAliveLoopByUart
mov ecx, ebp
call fcn.05066320
cmp byte [ebp + 0x421], 0
je 0x506ff1d
mov edx, dword [ebp]
lea ecx, [esp + 0x14]
push ecx
push edx
push str.META_HANDLE::CheckAliveLoopByUart
mov ecx, ebp
call fcn.05068b10
mov edi, eax
test edi, edi
je 0x506feb0
push str._WARNING:
push 0xd2
push 0xa5e
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0xc8], 0xa
mov ecx, dword [ebp]
mov edx, dword [ebp + 8]
push str.META_HANDLE::CheckAliveLoopByUart
push ecx
push str.__d___s:_Retrieve_key_failed
push edx
push eax
call fcn.051ae2d0
add esp, 0x14
mov dword [esp + 0xc8], esi
lea ecx, [esp + 0x28]
call fcn.051ae2c0
mov ebx, dword [esp + 0x14]
test ebx, ebx
jne 0x506febf
mov byte [0x53f4a0c], 1
push 0x52c722a
push 1
push 0xa64
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov esi, eax
mov dword [esp + 0xc8], 0xb
push ebx
push edi
call sym.META_DLL.dll_META_GetErrorString
mov ecx, dword [ebp + 8]
push eax
mov eax, dword [ebp]
push str.META_HANDLE::CheckAliveLoopByUart
push eax
push str.__d___s:_Retrieve_key__Result:__s__key_status:__d_
push ecx
push esi
call fcn.051ae2d0
add esp, 0x1c
mov dword [esp + 0xc8], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.051ae2c0
mov edx, dword [ebp]
push edx
push str.META_HANDLE::CheckAliveLoopByUart
mov ecx, ebp
call fcn.0506a0b0
test eax, eax
je 0x506ffc5
mov dword [esp + 0x14], eax
push 0x539d928
lea eax, [esp + 0x18]
push eax
call sub.MSVCR90.dll__CxxThrowException
push str._ERROR:
push 0xff
push 0xa2a
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0xc8], 7
mov ecx, dword [esi + 0x94]
mov edx, dword [ebp + 0x334]
push edi
push ecx
mov ecx, dword [ebp]
push edx
mov edx, dword [ebp + 8]
push str.META_HANDLE::CheckAliveLoopByUart
push ecx
push str.__d___s_COM_d_:_wait_for_target_ready_timeout__req__ms_connect_timeout__lu____ms_total_bootup_time__lu_
push edx
push eax
call fcn.051ae2d0
add esp, 0x20
mov dword [esp + 0xc8], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.051ae2c0
push 0x539d928
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x24
call sub.MSVCR90.dll__CxxThrowException
mov ecx, dword [esp + 0xc0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.0520b902
add esp, 0xb8
ret 0x10