Function at 0x506fff0
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x52215d2
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x53f3c3c]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53f3c3c]
xor eax, esp
push eax
lea eax, [esp + 0x7c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x90]
mov ebx, dword [esp + 0x8c]
mov ebp, ecx
lea ecx, [ebp + 0xc]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], eax
call fcn.051b3090
cmp dword [ebp + 0x328], 1
lea edi, [ebp + 0x4f4]
mov ecx, 0x26
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov esi, 0x525151c
je 0x5070064
mov esi, 0x5251518
push 0x52c722a
push 1
push 0xad8
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0x84], 0
mov ecx, dword [ebx]
mov edx, dword [ebp]
push esi
push ecx
mov ecx, dword [ebp + 8]
push str.META_HANDLE::WaitTargetAliveByUart
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 + 0x84], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.051ae2c0
mov edi, dword [ebp + 0x348]
cmp dword [ebp + 0x344], edi
lea esi, [ebp + 0x338]
jbe 0x50700d6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi]
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], ecx
cmp ecx, dword [esi + 0x10]
jbe 0x50700f2
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov eax, dword [esi]
push edi
push edx
push ecx
push eax
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.0506c5d0
cmp dword [ebx + 4], 0xff
lea edi, [ebx + 4]
mov dword [esp + 0x14], 0
je 0x507014d
mov eax, dword [edi]
cmp eax, 0xa
jg 0x507014d
push eax
push ebp
call fcn.05063de0
test eax, eax
jne 0x5070136
push edi
mov ecx, esi
call fcn.0506f4a0
mov eax, dword [esp + 0x14]
inc eax
cmp dword [ebx + eax*4 + 4], 0xff
lea edi, [ebx + eax*4 + 4]
mov dword [esp + 0x14], eax
jne 0x507011c
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
test ecx, 0xfffffffc
jne 0x5070181
xor edi, edi
lea ecx, [ecx]
push edi
push ebp
call fcn.05063de0
test eax, eax
jne 0x507017b
lea edx, [esp + 0x14]
push edx
mov ecx, esi
mov dword [esp + 0x18], edi
call fcn.0506f4a0
inc edi
cmp edi, 0xa
jle 0x5070160
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
sar eax, 2
test eax, eax
ja 0x5070194
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
push edx
push ebp
call fcn.05063de0
lea ecx, [ebp + 0xc]
call fcn.051b2fe0
test eax, eax
je 0x50701c3
push 0x539d928
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x19
call sub.MSVCR90.dll__CxxThrowException
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov byte [ebp + 0x32d], 1
call ebx
mov ecx, dword [esp + 0x1c]
mov dword [ebp + 0x428], eax
cmp dword [ecx], 0x2694
je 0x50702a7
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x30], 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 + 0xa0], 2
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x58], 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 + 0xbc], 3
lea eax, [ebp + 0x304]
or esi, 0xffffffff
push eax
mov dword [esp + 0xc0], esi
lea ecx, [esp + 0x78]
call fcn.051aef90
mov dword [esp + 0x84], 4
mov edx, dword [ebp]
push 1
push 0x1388
push edx
call sym.META_DLL.dll_META_WaitForTargetReady_r
mov edi, eax
mov dword [esp + 0x84], esi
lea ecx, [esp + 0x3c]
call fcn.051af090
call ebx
mov esi, eax
sub esi, dword [ebp + 0x428]
test edi, edi
je 0x5070321
mov edi, dword [esp + 0x18]
cmp dword [edi + 0x94], esi
jb 0x5070349
mov eax, dword [esp + 0x1c]
cmp dword [eax], 0x2694
jne 0x50701f3
push str._ERROR:
push 0xff
push 0xb07
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0x84], 1
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebp + 0x334]
push ecx
mov ecx, dword [ebp]
push edx
mov edx, dword [ebp + 8]
push str.META_HANDLE::WaitTargetAliveByUart
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 + 0x84], 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 byte [ebp + 0x32d], 0
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.0520b902
add esp, 0x74
ret 8
push str._ERROR:
push 0xff
push 0xb1a
push str..META_Handle.cpp
lea ecx, [esp + 0x38]
call fcn.051ae270
mov dword [esp + 0x84], 5
mov ecx, dword [edi + 0x94]
mov edx, dword [ebp + 0x334]
push esi
push ecx
mov ecx, dword [ebp]
push edx
mov edx, dword [ebp + 8]
push str.META_HANDLE::WaitTargetAliveByUart
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 + 0x84], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.051ae2c0
push 0x539d928
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 0x24
call sub.MSVCR90.dll__CxxThrowException
int3