Function at 0x40b850
Capabilities:
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x435ab0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov eax, dword [0x451114]
push ebx
push esi
push edi
mov esi, ecx
mov dword [esp + 0xc], eax
mov al, byte [esi + 0x1cc]
xor ebx, ebx
test al, al
mov dword [esp + 0x28], ebx
je 0x40b8da
push str.Download_Stopped.
lea ecx, [esp + 0x10]
call fcn.00428497
push 1
mov ecx, esi
call fcn.0040c500
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
push 0x455208
lea ecx, [esi + 0x98]
call fcn.0042d0b7
mov al, byte [0x4573c5]
mov dword [0x4573c0], ebx
cmp al, 1
jne 0x40b928
mov ecx, dword [esp + 0xc]
push ebx
push ebx
push ecx
call fcn.00430287
push ebx
call fcn.00416d06
mov di, word [esp + 0x30]
cmp di, 0x5004
jne 0x40b984
mov eax, dword [esi + 0x62c]
lea ecx, [esi + 0x470]
push eax
call fcn.0042d0b7
mov eax, dword [esi + 0x618]
lea ecx, [esi + 0x224]
push eax
push 0x409
call fcn.0042cff8
mov ecx, eax
call fcn.0042d0b7
push str.Report_File1_Size
lea ecx, [esp + 0x10]
call fcn.00428497
mov eax, dword [esi + 0x180]
lea edi, [esi + 0x180]
push eax
mov eax, dword [esp + 0x10]
push eax
call fcn.00416c2a
add esp, 8
test eax, eax
je 0x40b95f
mov ecx, dword [esp + 0xc]
push ecx
lea ecx, [esi + 0x5c]
call fcn.0042d0b7
lea edx, [esp + 0xc]
mov ecx, edi
push edx
call fcn.00428447
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.0042830e
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 4
cmp di, 0x5005
jne 0x40b9c5
mov eax, dword [esi + 0x630]
lea ecx, [esi + 0x434]
push eax
call fcn.0042d0b7
mov eax, dword [esi + 0x628]
lea ecx, [esi + 0x224]
push eax
push 0x40b
call fcn.0042cff8
mov ecx, eax
call fcn.0042d0b7
push str.Report_File2_Size
jmp 0x40b91f
cmp di, 0x5007
jne 0x40ba0b
mov eax, dword [esi + 0x938]
lea edi, [esi + 0x6c0]
push eax
push 0x428
mov ecx, edi
call fcn.0042cff8
mov ecx, eax
call fcn.0042d0b7
mov eax, dword [esi + 0x93c]
mov ecx, edi
push eax
push 0x3fa
call fcn.0042cff8
mov ecx, eax
call fcn.0042d0b7
jmp 0x40b928
cmp di, 0x5006
jne 0x40bba9
mov edx, dword [0x4573cc]
push ebp
lea ecx, [esp + 0x18]
mov eax, dword [edx + 0x10c9c]
push eax
call fcn.0042837c
mov ecx, dword [0x4573cc]
mov byte [esp + 0x2c], 1
mov edx, dword [ecx + 0x10ca0]
lea ecx, [esp + 0x14]
push edx
call fcn.0042837c
mov eax, dword [0x4573cc]
mov ecx, dword [esp + 0x18]
mov byte [esp + 0x2c], 2
mov ebp, dword [eax + 0x10ca8]
mov eax, dword [ecx - 8]
shr ebp, 0x11
cmp eax, ebx
jne 0x40baa2
mov edx, dword [esp + 0x14]
cmp dword [edx - 8], ebx
jne 0x40baa2
lea edi, [esi + 0x61c]
push str.External_Device_Detected
mov ecx, edi
call fcn.00428497
mov eax, dword [edi]
lea ecx, [esi + 0x59c]
push eax
call fcn.0042d0b7
mov edi, dword [edi]
lea ecx, [esi + 0x848]
push edi
call fcn.0042d0b7
jmp 0x40bb87
mov eax, dword [0x451114]
mov dword [esp + 0x34], eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 3
push ecx
lea ecx, [esp + 0x24]
call fcn.00428083
lea edx, [esp + 0x14]
mov bl, 4
push edx
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], bl
call fcn.00428083
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x34]
push eax
push str.Flash_Name_:__r_n_s_r_n
push ecx
mov byte [esp + 0x38], 5
call fcn.00426b2a
add esp, 0xc
lea edi, [esi + 0x61c]
lea edx, [esp + 0x34]
mov ecx, edi
push edx
call fcn.00428447
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push eax
push str.Manufacturer_:__s_r_n
push ecx
call fcn.00426b2a
add esp, 0xc
lea edx, [esp + 0x34]
mov ecx, edi
push edx
call fcn.00428711
push ebp
lea eax, [esp + 0x38]
push str.Flash_Size_:__d_Mb
push eax
call fcn.00426b2a
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
mov ecx, edi
call fcn.00428711
mov eax, dword [edi]
lea ecx, [esi + 0x59c]
push eax
call fcn.0042d0b7
mov edi, dword [edi]
lea ecx, [esi + 0x848]
push edi
call fcn.0042d0b7
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], bl
call fcn.0042830e
lea ecx, [esp + 0x20]
mov byte [esp + 0x2c], 3
call fcn.0042830e
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 2
call fcn.0042830e
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 1
call fcn.0042830e
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 0
call fcn.0042830e
pop ebp
jmp 0x40b928
cmp di, 0x19
jne 0x40bbb9
push str.Please_DO_NOT_reset._Waiting_for_USB_to_configure...
jmp 0x40b91f
cmp di, 0x18
jne 0x40bbc9
push str.Checking_for_TL_software
jmp 0x40b91f
cmp di, 0xb
jne 0x40bc22
push str.Please_reset_the_target_to_start_communication...
lea ecx, [esp + 0x10]
call fcn.00428497
cmp byte [0x4573c5], 1
jne 0x40b928
mov eax, dword [0x4573d0]
mov edx, eax
inc eax
cmp edx, 1
mov dword [0x4573d0], eax
jge 0x40b928
mov ecx, dword [esi + 0x184]
push 5
call fcn.0042d1d3
push 0x12c
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Beep]
jmp 0x40b928
cmp di, 0xa
jne 0x40bc32
push str.Target_Detected__Downloading_flash_programmer...
jmp 0x40b91f
cmp di, 0x401
jne 0x40bc43
push str.Establishing_Link...Parsing_File
jmp 0x40b91f
cmp di, 0x432
jne 0x40bc54
push str.Querying_for_the_device_information...
jmp 0x40b91f
cmp di, 0x403
jne 0x40bc65
push str.Device_Info_gathered.
jmp 0x40b91f
cmp di, 0x435
jne 0x40bc83
mov ecx, dword [0x4573cc]
push 1
call fcn.0040c4c0
push str.Erasing_Flash__this_may_take_a_few_minutes_to_complete.
jmp 0x40b91f
cmp di, 0x405
jne 0x40bca0
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
push str.Flash_erased_successfully
jmp 0x40b91f
cmp di, 0x43b
jne 0x40bcc6
push str.Sending_the_data_packet_s_...
lea ecx, [esp + 0x10]
call fcn.00428497
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
jmp 0x40b928
cmp di, 0x404
jne 0x40bced
push str.Previous_Data_written..._Parsing_the_next_file
lea ecx, [esp + 0x10]
call fcn.00428497
mov ecx, dword [0x4573cc]
push 1
call fcn.0040c4c0
jmp 0x40b928
cmp di, 0x406
jne 0x40bd46
push str.Download_Completed.
lea ecx, [esp + 0x10]
call fcn.00428497
push 1
mov ecx, esi
call fcn.0040c500
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
push 0x12c
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Beep]
cmp byte [0x4573c5], 1
jne 0x40be01
mov eax, dword [esp + 0xc]
push ebx
push ebx
push eax
call fcn.00430287
push ebx
call fcn.00416d06
cmp di, 0x43c
jne 0x40bd57
push str.Please_wait.
jmp 0x40b91f
cmp di, 0x441
jne 0x40bd7e
push str.Diagnosing_Flash...
lea ecx, [esp + 0x10]
call fcn.00428497
mov ecx, dword [0x4573cc]
push 1
call fcn.0040c4c0
jmp 0x40b928
cmp di, 0x416
jne 0x40bd8f
push str.FLASH_check_successful.
jmp 0x40bcac
cmp di, 0x440
jne 0x40bdb6
push str.Diagnosing_RAM...
lea ecx, [esp + 0x10]
call fcn.00428497
mov ecx, dword [0x4573cc]
push 1
call fcn.0040c4c0
jmp 0x40b928
cmp di, 0x417
jne 0x40bdc7
push str.RAM_check_successful.
jmp 0x40bcac
cmp di, 0x418
jne 0x40be0c
push str.Diagnosis_completed.
lea ecx, [esp + 0x10]
call fcn.00428497
push 1
mov ecx, esi
call fcn.0040c500
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
push 0x12c
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Beep]
mov dword [0x4573c0], ebx
jmp 0x40b928
cmp di, 0x41b
jne 0x40be2c
push str.Upload_Completed.
lea ecx, [esp + 0x10]
call fcn.00428497
push 1
mov ecx, esi
call fcn.0040c500
jmp 0x40bdf1
cmp di, 0x433
jne 0x40be3d
push str.Querying_for_Device_Base_Address...
jmp 0x40b91f
cmp di, 0x41e
jne 0x40be4e
push str.Device_Base_Address_sent_successfully...
jmp 0x40b91f
cmp di, 0x434
jne 0x40be6b
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
push str.Protecting_the_device...
jmp 0x40b91f
cmp di, 0x44c
jne 0x40be88
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
push str.Unprotecting_the_device...
jmp 0x40b91f
cmp di, 0x41f
jne 0x40be99
push str.Device_protected_successfully
jmp 0x40b91f
cmp di, 0x44a
jne 0x40beaa
push str.Device_unprotected_successfully
jmp 0x40b91f
cmp di, 0x436
jne 0x40bed1
push str.Sending_the_partial_erase_start_address...
lea ecx, [esp + 0x10]
call fcn.00428497
mov ecx, dword [0x4573cc]
push 1
call fcn.0040c4c0
jmp 0x40b928
cmp di, 0x420
jne 0x40bee2
push str.Erase_segment_start_address_sent_successfully
jmp 0x40b91f
cmp di, 0x437
jne 0x40bf09
push str.Partial_erasing_the_device...
lea ecx, [esp + 0x10]
call fcn.00428497
mov ecx, dword [0x4573cc]
push 1
call fcn.0040c4c0
jmp 0x40b928
cmp di, 0x421
jne 0x40bf1a
push str.Erase_segment_end_address_sent_successfully
jmp 0x40b91f
cmp di, 0x438
jne 0x40bf2b
push str.Sent_program_start_address...
jmp 0x40b91f
cmp di, 0x422
jne 0x40bf3c
push str.Sent_program_start_address_successfully
jmp 0x40bcac
cmp di, 0x439
jne 0x40bf4d
push str.Sent_program_end_address
jmp 0x40b91f
cmp di, 0x423
jne 0x40bf5e
push str.Sent_program_end_address_successfully
jmp 0x40b91f
cmp di, 0x43a
jne 0x40bf6f
push str.Sent_the_data_packet_size
jmp 0x40b91f
cmp di, 0x43d
jne 0x40bf80
push str.Sent_reverse_download_command...
jmp 0x40b91f
cmp di, 0x43e
jne 0x40bf91
push str.Upload_in_progress...
jmp 0x40b91f
cmp di, 0x419
jne 0x40bfa2
push str.Reverse_Download...
jmp 0x40b91f
cmp di, 0x43f
je 0x40bf87
cmp di, 0x41a
je 0x40bf87
cmp di, 0x42a
jne 0x40bfc1
push str.Lock_start_address_sent_successfully
jmp 0x40b91f
cmp di, 0x42b
jne 0x40bfd2
push str.Unlock_start_address_sent_successfully
jmp 0x40b91f
cmp di, 0x442
jne 0x40bfe3
push str.SENT_LOCK_SEG_ST_ADDR
jmp 0x40b91f
cmp di, 0x443
jne 0x40bff4
push str.Locking_the_device
jmp 0x40b91f
cmp di, 0x444
jne 0x40c005
push str.SENT_UNLOCK_SEG_ST_ADDR
jmp 0x40b91f
cmp di, 0x445
jne 0x40c016
push str.Unlocking_the_device
jmp 0x40b91f
cmp di, 0x446
jne 0x40c027
push str.Soft_reset_intiated
jmp 0x40b91f
push 1
mov ecx, esi
call fcn.0040c500
movsx eax, di
cmp eax, 0x205
jg 0x40c0e3
je 0x40c0d9
add eax, 0xfffffffd
cmp eax, 0x14
ja case.0x40c0f9.1053
jmp dword [eax*4 + 0x40c220]
push str.Error_in_reading_file.
jmp 0x40c1d3
push str.Error_in_opening_the_file.
jmp 0x40c1d3
push str.Error_in_creating_the_file_object.
jmp 0x40c1d3
push str.Error_in_creating_the_device_object.
jmp 0x40c1d3
push str.Error_in_downloading_target_loader.
jmp 0x40c1d3
push str.Error_in_getting_device_info_Unsupported_device.
jmp 0x40c1d3
push str.Error_in_creation_of_file_object.
jmp 0x40c1d3
push str.Error_in_opening_download_file.
jmp 0x40c1d3
push str.Error_in_downloading_the_application.
jmp 0x40c1d3
push str.Error_in_opening_the_log_file.
jmp 0x40c1d3
push str.Error_in_opening_the_upload_file.
jmp 0x40c1d3
push str.Error_in_diagnosing_the_device.
jmp 0x40c1d3
push str.Error_in_Writing_to_the_file.
jmp 0x40c1d3
push str.Could_not_open_USB_communication
jmp 0x40c1d3
add eax, 0xfffffbfe
cmp eax, 0x4c
ja case.0x40c0f9.1053
xor ecx, ecx
mov cl, byte [eax + 0x40c2e4]
jmp dword [ecx*4 + 0x40c274]
push str.Download_Stopped.
jmp 0x40c1d3
push str.Upload_Stopped.
jmp 0x40c1d3
push str.Error_in_communicating_to_target__Try_restarting_the_process.
jmp 0x40c1d3
push str.Error_in_opening_the_communication_channel.
jmp 0x40c1d3
push str.Error_in_Erase_Function.
jmp 0x40c1d3
push str.Error_in_Lock_Unlock.
jmp 0x40c1d3
push str.Error_in_reverse_download.
jmp 0x40c1d3
push str.Error_in_start_address.
jmp 0x40c1d3
push str.Address_out_of_bounds.
jmp 0x40c1d3
push str.Error_in_patch_reading.
jmp 0x40c1d3
push str.Error_in_patch_writing.
jmp 0x40c1d3
push str.Error_in_soft_reset.
jmp 0x40c1d3
push str.Error_in_getting_device_info
jmp 0x40c1d3
push str.Error_in_sending_the_device_base_address
jmp 0x40c1d3
push str.Error_in_device_protection
jmp 0x40c1d3
push str.Error_in_device_unprotection
jmp 0x40c1d3
push str.Error_in_erasing_flash
jmp 0x40c1d3
push str.Could_not_send_erase_segment_start_address
jmp 0x40c1d3
push str.Could_not_send_erase_segment_end_address
jmp 0x40c1d3
push str.Could_not_send_program_start_address
jmp 0x40c1d3
push str.Could_not_send_program_end_address
jmp 0x40c1d3
push str.Could_not_send_data_packet_size
jmp 0x40c1d3
push str.Could_not_send_data_packet
jmp 0x40c1d3
push str.Could_not_execute_the_code
jmp 0x40c1d3
push str.Could_not_send_upload_data_size_command
jmp 0x40c1d3
push str.Could_not_send_RAM_check_command
jmp 0x40c1d3
push str.Could_not_send_FLASH_check_command
lea ecx, [esp + 0x10]
call fcn.00428497
mov ecx, dword [0x4573cc]
push ebx
call fcn.0040c4c0
push 0x455208
lea ecx, [esi + 0x98]
call fcn.0042d0b7
mov al, byte [0x4573c5]
mov dword [0x4573c0], ebx
cmp al, 1
jne 0x40b928
mov edx, dword [esp + 0xc]
push ebx
push ebx
push edx
call fcn.00430287
push ebx
call fcn.00416d06
lea ecx, [ecx]
push edi
rol byte [eax], 207
rol byte [eax], 0x6b
rol byte [eax], 0x61
rol byte [eax], 0xb1
rol byte [eax], 0x75
rol byte [eax], 0x7f
rol byte [eax], 0xdc
rol dword [eax], 0xdc
rol dword [eax], 0x89
rol byte [eax], 0x93
rol byte [eax], 0xdc
rol dword [eax], 0xdc
rol dword [eax], 0xdc
rol dword [eax], 0xdc
rol dword [eax], 0x9d
rol byte [eax], 0xa7
rol byte [eax], 0xb1
rol byte [eax], 0xbb
rol byte [eax], 0x3c
rol dword [eax], 0xc5
rol byte [eax], 0x14
rol dword [eax], 0x6c
rol dword [eax], 0x73
rol dword [eax], 0x7a
rol dword [eax], 0x88
rol dword [eax], 0x8f
rol dword [eax], 0x96
rol dword [eax], 0x9d
rol dword [eax], 0xa4
rol dword [eax], 0xab
rol dword [eax], 0xb2
rol dword [eax], 0xb9
rol dword [eax], 0xc0
rol dword [eax], 0x3c
rol dword [eax], 0xc7
rol dword [eax], 0xce
rol dword [eax], 0x1e
rol dword [eax], 0x28
rol dword [eax], 0x32
rol dword [eax], 0x57
rol dword [eax], 0x5e
rol dword [eax], 0x65
rol dword [eax], 0x46
rol dword [eax], 0x50
rol dword [eax], 0x81
rol dword [eax], 0
rol dword [eax], 0xa
rol dword [eax], 0xdc
rol dword [eax], 0
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
add dword [edx], eax
add eax, dword [eax + 0x9080706]
or cl, byte [ebx]
or al, 0xd
push cs
bndstx [ebx], bnd3
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
adc byte [ecx], dl
sbb edx, dword [edx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
adc edx, dword [ebx + ebx]
sbb edx, dword [0x1b1b1b1b]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
sbb ebx, dword [ebx]
push ss
pop ss
sbb ebx, dword [ebx]
sbb byte [ebx], bl
sbb dword [edx], ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop