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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x53f848
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x58f660]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x58f660]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
xor ebx, ebx
mov edi, ecx
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
mov dword [esp + 0x48], ebx
mov esi, dword [edi + 0x24]
mov cl, 0x21
mov byte [edi + 0x38], bl
mov dword [esp + 0x18], 0x14
call fcn.0041a6f0
mov esi, eax
lea ecx, [esp + 0x1c]
cmp esi, ebx
je 0x417896
mov eax, dword [edi + 0x54]
cmp byte [eax + 0x54], bl
je 0x41786f
push 0x14
push 0x56e0ec
jmp 0x417876
push 0x27
push str.Failed_to_switch_to_the_User_partition_
call fcn.004044c0
cmp dword [esp + 0x30], 0x10
jb 0x41788f
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041f6cd
add esp, 4
mov eax, esi
jmp 0x417c53
push ebx
mov edx, edi
call fcn.00418dc0
mov edx, dword [edi + 0x54]
cmp byte [edx + 0x54], bl
je 0x4178cb
movzx eax, word [edi + 0x2c]
mov ecx, dword [edi + 0x30]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push 0x56e12c
and eax, 0xff
shl eax, 0x10
push eax
push 0x178c
push ecx
call esi
jmp 0x4178f3
movzx edx, word [edi + 0x2c]
mov eax, dword [edi + 0x30]
push str.Downloading_the_msimage_file
and edx, 0xff
shl edx, 0x10
push edx
push 0x178c
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00417ed0
mov dword [esp + 0x14], eax
cmp eax, ebx
je 0x417954
mov eax, dword [esp + 0x1c]
mov ebx, 0x10
cmp dword [esp + 0x30], ebx
jae 0x417918
lea eax, [esp + 0x1c]
movzx edx, word [edi + 0x2c]
and edx, 0xff
push eax
mov eax, dword [edi + 0x30]
or edx, 0x100
shl edx, 0x10
push edx
push 0x178c
push eax
call esi
cmp dword [esp + 0x30], ebx
jb 0x41794b
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041f6cd
add esp, 4
mov eax, dword [esp + 0x14]
jmp 0x417c53
mov edx, dword [edi + 0x40]
cmp byte [edx + 0x79], bl
jne 0x4179c7
mov eax, dword [edi + 0x54]
cmp byte [eax + 0x54], bl
je 0x417988
movzx ecx, word [edi + 0x2c]
mov edx, dword [edi + 0x30]
and ecx, 0xff
push 0x56e164
or ecx, 0x200
shl ecx, 0x10
push ecx
push 0x178c
push edx
jmp 0x4179a8
movzx eax, word [edi + 0x2c]
mov ecx, dword [edi + 0x30]
and eax, 0xff
push str.STREAM_protocol_downloaded__and_the_download_ends
or eax, 0x200
shl eax, 0x10
push eax
push 0x178c
push ecx
call esi
cmp dword [esp + 0x30], 0x10
jb 0x417c51
mov edx, dword [esp + 0x1c]
push edx
call fcn.0041f6cd
add esp, 4
jmp 0x417c51
push 1
lea ecx, [esp + 0x20]
mov edx, edi
call fcn.00418dc0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x54]
cmp byte [eax + 0x54], bl
je 0x417a04
movzx ecx, word [edi + 0x2c]
mov edx, dword [edi + 0x30]
push 0x56e1b8
and ecx, 0xff
shl ecx, 0x10
push ecx
push 0x178c
push edx
jmp 0x417a1f
movzx eax, word [edi + 0x2c]
mov ecx, dword [edi + 0x30]
push str.Is_Erasing_data
and eax, 0xff
shl eax, 0x10
push eax
push 0x178c
push ecx
call esi
lea edx, [esp + 0x1c]
push edx
mov ebx, edi
call fcn.00417c80
mov ebx, eax
test ebx, ebx
je 0x417a70
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x417a42
lea eax, [esp + 0x1c]
mov ecx, dword [edi + 0x30]
push eax
movzx eax, word [edi + 0x2c]
and eax, 0xff
or eax, 0x100
shl eax, 0x10
push eax
push 0x178c
push ecx
call esi
lea ecx, [esp + 0x1c]
call fcn.004042a0
mov eax, ebx
jmp 0x417c53
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [edi + 0x54]
mov ebx, eax
sub ebx, dword [esp + 0x14]
cmp byte [edx + 0x54], 0
push ebx
je 0x417a8d
push 0x56e1d8
jmp 0x417a92
push str.Erase_the_data_ok__time_cost__d
push 0x597e50
call fcn.00515b45
movzx eax, word [edi + 0x2c]
mov ecx, dword [edi + 0x30]
add esp, 0xc
push 0x597e50
and eax, 0xff
shl eax, 0x10
push eax
push 0x178c
push ecx
call esi
add ebx, 0x7d0
mov dword [esp + 0x14], ebx
jmp 0x417ad6
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [edi + 0x54]
cmp byte [eax + 0x54], 0
je 0x417b00
mov ebx, dword [esp + 0x18]
push ebx
push str.Sending_Close_Packet__retry_d
push 0x597e50
call fcn.00515b45
jmp 0x417b18
mov ecx, dword [esp + 0x18]
push ecx
push str.Sending_Close_Packet__retry_d
push 0x597e50
call fcn.00515b45
mov ebx, dword [esp + 0x24]
movzx edx, word [edi + 0x2c]
mov eax, dword [edi + 0x30]
add esp, 0xc
push 0x597e50
and edx, 0xff
shl edx, 0x10
push edx
push 0x178c
push eax
call esi
mov esi, dword [edi + 0x24]
call fcn.0041a540
mov ecx, dword [edi + 0x54]
mov esi, eax
test esi, esi
je 0x417b9c
push ebx
push str.Failed_to_send_Close_Packet__retry_d
push 0x597e50
call fcn.00515b45
movzx edx, word [edi + 0x2c]
mov eax, dword [edi + 0x30]
add esp, 0xc
push 0x597e50
and edx, 0xff
shl edx, 0x10
push edx
push 0x178c
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
dec ebx
mov dword [esp + 0x18], ebx
test ebx, ebx
jg 0x417ad0
lea ecx, [esp + 0x1c]
call fcn.004042a0
mov eax, esi
jmp 0x417c53
cmp byte [ecx + 0x54], 0
push 0
je 0x417bb3
mov edx, dword [edi + 0x2c]
mov eax, dword [edi + 0x30]
push edx
push eax
mov ecx, 0x56e258
jmp 0x417bc0
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x30]
push ecx
push edx
mov ecx, str.Send_the_phone_restart_command
xor eax, eax
call fcn.00416ca0
mov esi, dword [edi + 0x24]
add esp, 0xc
call fcn.0041a7b0
mov esi, eax
push 0
test esi, esi
je 0x417c19
mov eax, dword [edi + 0x54]
cmp byte [eax + 0x54], 0
je 0x417bf2
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x30]
push ecx
push edx
mov ecx, 0x56e28c
jmp 0x417bff
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x30]
push eax
push ecx
mov ecx, str.Failed_to_send_the_phone_restart_command
mov eax, 1
call fcn.00416ca0
add esp, 0xc
lea ecx, [esp + 0x1c]
call fcn.004042a0
mov eax, esi
jmp 0x417c53
mov edx, dword [edi + 0x54]
cmp byte [edx + 0x54], 0
je 0x417c31
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x30]
push eax
push ecx
mov ecx, 0x56e2d0
jmp 0x417c3e
mov edx, dword [edi + 0x2c]
mov eax, dword [edi + 0x30]
push edx
push eax
mov ecx, str.Waiting_to_enter_Usb_download
xor eax, eax
call fcn.00416ca0
add esp, 0xc
lea ecx, [esp + 0x1c]
call fcn.004042a0
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00514194
mov esp, ebp
pop ebp
ret