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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1021a078
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x105520d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [ebp + 8]
push edi
push str.ARMPRGFilePath__s
push 2
push esi
call fcn.101fad20
mov eax, dword [ebp + 0xc]
push eax
push str.EMMCUserParitionImage__s
push 2
push esi
call fcn.101fad20
movzx ecx, byte [ebp + 0x10]
push ecx
push str.bUseTrustedMode__d
push 2
push esi
call fcn.101fad20
movzx edx, byte [ebp + 0x14]
push edx
push str.bSkipGoToDownload__d
push 2
push esi
call fcn.101fad20
mov ebx, dword [ebp + 0x18]
add esp, 0x40
push ebx
push str.iSleepTimeToDOWNLOADmode___d_ms
push 2
push esi
call fcn.101fad20
mov eax, dword [ebp + 0x1c]
push eax
push str.iSleepTimeToGOcommand___d_ms
push 2
push esi
call fcn.101fad20
add esp, 0x20
cmp byte [edi], 0
je 0x101fd8cb
cmp byte [ebp + 0x14], 0
jne 0x101fd842
mov ecx, dword [ebp + 0x20]
push ebx
push ecx
mov ecx, esi
call fcn.101fc690
test al, al
jne 0x101fd8b3
jmp 0x101fdaae
push 0x3e8
push 1
mov ecx, esi
call fcn.101fbc50
xor edi, edi
mov bl, al
cmp dword [esi + 0x24], edi
jbe 0x101fd8a8
lea esp, [esp]
test bl, bl
jne 0x101fd8b0
mov ecx, dword [esi]
call fcn.10145c30
mov edx, dword [esi + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi]
call fcn.10146320
cmp al, 1
jne 0x101fd8a2
lea eax, [edi + 1]
push eax
push str.Retry__Sending_NOP___d
push esi
call fcn.100df120
add esp, 0xc
push 0x3e8
push 1
mov ecx, esi
call fcn.101fbc50
mov bl, al
inc edi
cmp edi, dword [esi + 0x24]
jb 0x101fd860
test bl, bl
je 0x101fdaae
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
push ecx
push edx
push edi
mov ecx, esi
call fcn.101fb920
test al, al
je 0x101fdaae
push str.QMSL_DownloadAgent::Step2__Downloading_Software_Image_Files_
push esi
call fcn.100df120
xor edi, edi
add esp, 8
xor al, al
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
cmp dword [esi + 0x1c], edi
jbe 0x101fd9c2
lea esp, [esp]
test al, al
jne 0x101fd9c2
lea eax, [edi + 1]
push eax
push str.Sending_HELLO_to_flash_programmer___d
push esi
call fcn.100df120
add esp, 0xc
push 0x7d0
push 1
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x14]
push edx
mov ecx, esi
call fcn.101fb280
mov byte [ebp + 0x17], al
test al, al
je 0x101fd940
movzx eax, word [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push eax
push ecx
push str.HELLO_command_succeeded__block_size__u__window_size__u
push esi
call fcn.100df120
add esp, 0x10
jmp 0x101fd9b5
push 0x1021c9c8
push 0xf
push esi
call fcn.101fadb0
mov ecx, dword [esi]
add esp, 0xc
call fcn.10145c30
cmp al, 1
jne 0x101fd9a7
mov edx, dword [esi + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push edx
call ebx
cmp edi, dword [esi + 0x1c]
jae 0x101fd996
lea esp, [esp]
mov ecx, dword [esi]
call fcn.10146320
test al, al
jne 0x101fd996
inc edi
push edi
push str.Failed_to_open_the_serial_port_for_retrying_the_Hello___d
push esi
call fcn.100df120
mov eax, dword [esi + 0x18]
add esp, 0xc
push eax
call ebx
cmp edi, dword [esi + 0x1c]
jb 0x101fd970
mov ecx, dword [esi]
call fcn.10146320
test al, al
je 0x101fdaae
jmp 0x101fd9b5
push str.Failed_to_close_the_port_before_opening_the_new_port_before_retrying_the_Hello
push esi
call fcn.100df120
add esp, 8
mov al, byte [ebp + 0x17]
inc edi
cmp edi, dword [esi + 0x1c]
jb 0x101fd8f0
add dword [ebp - 0x10], 0xffff
test al, al
je 0x101fdaa8
lea ecx, [ebp + 0x14]
call fcn.101ffda0
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.101faf90
test al, al
jne 0x101fda1c
push str.QMSL_DownloadAgent::UploadEmmcUserParitionImage__
push 3
push esi
call fcn.101fadb0
mov edx, dword [ebp + 0x20]
add esp, 0xc
lea ecx, [ebp + 0x14]
mov dword [edx], 3
mov dword [ebp - 4], 0xffffffff
call fcn.101ffdc0
jmp 0x101fdaae
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push eax
mov eax, dword [esi]
push ecx
mov ecx, dword [ebp + 0xc]
push 0x2710
push 0x21
lea edx, [ebp + 0x14]
push edx
push eax
push ecx
mov ecx, esi
call fcn.101fbf10
test al, al
jne 0x101fda6b
push str.QMSL_DownloadAgent::DownloadSB2ImageSet__
push 5
push esi
call fcn.101fadb0
mov edx, dword [ebp + 0x20]
add esp, 0xc
lea ecx, [ebp + 0x14]
mov dword [edx], 5
mov dword [ebp - 4], 0xffffffff
call fcn.101ffdc0
jmp 0x101fdaae
push 0x1388
mov ecx, esi
call fcn.101fb2e0
lea ecx, [ebp + 0x14]
mov bl, al
mov dword [ebp - 4], 0xffffffff
call fcn.101ffdc0
test bl, bl
je 0x101fdaae
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c