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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
and esi, 0xf
push esi
mov ebx, ecx
push str.QLIB_DIAG_CONTROL_F_eMode_d_
lea eax, [ebx + 0xa5e4]
push 2
push eax
mov dword [ebp - 8], eax
call fcn.10115e20
add esp, 0x10
lea ecx, [ebx + 0x104c]
call fcn.101468d0
push 0x29
lea ecx, [ebx + 0x104c]
call fcn.10146660
push esi
lea ecx, [ebx + 0x104c]
call fcn.10146690
push 0
mov ecx, ebx
call fcn.1007c7a0
mov byte [ebp - 1], al
mov byte [ebp - 2], 0
cmp esi, 3
jne 0x1007ceeb
push 0xb
mov ecx, ebx
call fcn.10073eb0
mov esi, eax
test esi, esi
je 0x1007ced3
mov eax, dword [ebp - 8]
push esi
push str.QLIB_DIAG_CONTROL_F______post_FTM_mode_switch_delay_is__dms.
push 4
push eax
call fcn.10115e20
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1007cfa4
mov ecx, dword [ebp - 8]
push str.QLIB_DIAG_CONTROL_F______post_FTM_mode_switch_delay_is_zero.
push 4
push ecx
call fcn.10115e20
add esp, 0xc
jmp 0x1007cfa4
cmp esi, 4
jne 0x1007cf34
push 0xc
mov ecx, ebx
call fcn.10073eb0
mov esi, eax
test esi, esi
je 0x1007cf1f
mov edx, dword [ebp - 8]
push esi
push str.QLIB_DIAG_CONTROL_F______post_ONLINE_mode_switch_delay_is__dms.
push 4
push edx
call fcn.10115e20
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1007cfa4
mov eax, dword [ebp - 8]
push str.QLIB_DIAG_CONTROL_F______post_ONLINE_mode_switch_delay_is_zero.
push 4
push eax
call fcn.10115e20
add esp, 0xc
jmp 0x1007cfa4
cmp esi, 1
je 0x1007cf3d
test esi, esi
jne 0x1007cf80
push 0xd
mov ecx, ebx
mov byte [ebp - 2], 1
call fcn.10073eb0
mov edi, eax
test edi, edi
je 0x1007cf6d
mov ecx, dword [ebp - 8]
push edi
push str.QLIB_DIAG_CONTROL_F______post_OFFLINE_mode_switch_delay_is__dms.
push 4
push ecx
call fcn.10115e20
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1007cf80
mov edx, dword [ebp - 8]
push str.QLIB_DIAG_CONTROL_F______post_OFFLINE_mode_switch_delay_is_zero.
push 4
push edx
call fcn.10115e20
add esp, 0xc
cmp esi, 5
jne 0x1007cf9a
mov eax, dword [ebp - 8]
push str.QLIB_DIAG_CONTROL_F______enabling_phone_mode_read_back_flag_for_LPM__please_make_sure_QMSL_Timeout_Runtime_Mode_Switching_is_configured_long_enough.
push 4
push eax
call fcn.10115e20
add esp, 0xc
jmp 0x1007cfa4
cmp byte [ebp - 2], 0
je 0x1007d0d7
push 0x12
mov ecx, ebx
call fcn.10073eb0
mov edi, dword [ebp - 8]
mov esi, eax
push esi
push str.DIAG_CONTROL_F____post_runtime_mode_switch_timeout_is__d_ms.
push 4
push edi
mov dword [ebp - 0x10], esi
call fcn.10115e20
add esp, 0x10
cmp dword [ebx + 0x1048], 0x4b
jne 0x1007d0b3
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
mov dword [ebp - 0x14], eax
xor esi, esi
mov byte [ebp - 1], 0
mov byte [ebp - 2], 0
cmp byte [ebp - 2], 0
jne 0x1007d05e
lea ecx, [ebp - 0xc]
push ecx
mov ecx, ebx
mov dword [ebp - 0xc], 0xffffffff
call fcn.1007cb70
call edi
mov esi, eax
mov eax, dword [ebp + 8]
sub esi, dword [ebp - 0x14]
cmp eax, 3
jne 0x1007d015
cmp dword [ebp - 0xc], 1
jmp 0x1007d043
cmp eax, 4
jne 0x1007d020
cmp dword [ebp - 0xc], 5
jmp 0x1007d043
mov ecx, dword [ebp - 0xc]
test eax, eax
je 0x1007d02c
cmp eax, 1
jne 0x1007d03b
cmp ecx, 2
je 0x1007d05a
cmp ecx, 3
je 0x1007d05a
cmp ecx, 4
je 0x1007d05a
cmp eax, 5
jne 0x1007d045
cmp ecx, 6
je 0x1007d05a
cmp esi, dword [ebp - 0x10]
jae 0x1007d054
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1007cfe8
mov byte [ebp - 2], 1
jmp 0x1007cfe8
mov byte [ebp - 1], 1
mov al, byte [ebp - 1]
test al, al
je 0x1007d089
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
push edx
push esi
push str.DIAG_CONTROL_F____mode_switching_status_polling_has_succeeded__time_used___d__total_timeout___d__ms.
push 4
push eax
call fcn.10115e20
mov al, byte [ebp - 1]
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [ebp - 2], 0
je 0x1007d0f1
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
push ecx
push esi
push str.DIAG_CONTROL_F____mode_switching_status_polling_has_timeout__time_used___d__total_timeout___d__ms.
push 4
push edx
call fcn.10115e20
mov al, byte [ebp - 1]
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push str.DIAG_CONTROL_F____mode_switching_status_polling_skipped_with_FTM_COMMAND_59__did_an_extra_sleep_with__d_ms
push 4
push edi
call fcn.10115e20
mov al, byte [ebp - 1]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
push eax
push str.DIAG_CONTROL_F____no_mode_read_back_for_eMode___d
push 4
push ecx
call fcn.10115e20
mov al, byte [ebp - 1]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4