Function at 0x43b817
Capabilities:
Accept command line arguments
Get common file path
Get graphical window text
Read .ini file

Disassembly:
sub esp, 0x558
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x505bbc], eax
mov eax, dword [esp + 0x55c]
push str.psapi.dll
mov dword [0x4fa13c], eax
call fcn.0042596f
mov dword [0x4fc5c0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x4fa034], eax
call fcn.00424578
test eax, eax
je 0x43b863
mov dword [0x4fa134], 1
jmp 0x43b86d
call fcn.0042455b
call fcn.0042cba1
push ebx
push ebp
push esi
push edi
push 0x4f9b48
call fcn.004297e7
call fcn.004297c5
call fcn.004273a5
call fcn.00443212
push 0x40
push 0x4f9c70
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
push 0x40
push 0x4f9808
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, 0x4f9600
push esi
call fcn.0042834d
push 0x4f9cf0
push esi
call fcn.00426483
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
mov edi, 0x4f9890
push edi
call ebx
push str..ini
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
call fcn.00428ba6
push edi
push dword [0x4fa10c]
mov ebp, 0x44d58c
push str.ShowDebug
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push 0xffffffffffffffff
push str.DpiAwareness
push ebp
mov dword [0x4fa0fc], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [0x492a2c], eax
cmp eax, 0xffffffff
jne 0x43b925
push 4
pop eax
push edi
push eax
push str.DpiAwareness
push ebp
mov dword [0x492a2c], eax
call fcn.00426504
push dword [0x492a2c]
call fcn.00428e06
cmp dword [0x492a2c], 4
jl 0x43b943
call fcn.0042a345
mov dword [0x492a30], eax
push str.Riched32.dll
call fcn.0042596f
xor ebp, ebp
mov dword [0x4fa138], eax
cmp eax, ebp
jne 0x43b962
mov eax, 0xfe
jmp 0x43c396
call fcn.0044726f
push 0x4fa0cc
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4fa0e4
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x4f9ef8
push esi
call fcn.00424c23
push 0x4f9580
call fcn.00424700
call fcn.004259bd
mov dword [0x4fa12c], eax
call fcn.004259ed
push edi
push 1
push str.CrashDump
push 0x44d58c
mov dword [0x4fa130], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x43b9d4
push 0x43f720
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0043f2c5
xor eax, eax
inc eax
cmp dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
jle 0x43bb62
mov eax, dword [esp + 0x10]
mov esi, dword [esp + eax*4 + 0xe8]
push esi
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 2
jb 0x43bbfc
movzx eax, word [esi]
cmp ax, 0x2d
je 0x43ba29
cmp ax, 0x2f
jne 0x43bbfc
movzx eax, word [esi + 4]
cmp ax, bp
je 0x43ba52
cmp ax, 0x3a
je 0x43ba52
movzx ecx, word [esi + 6]
cmp cx, 0x3a
je 0x43ba52
cmp ax, 0x3d
je 0x43ba52
cmp cx, 0x3d
jne 0x43bbfc
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x52
jne 0x43ba82
lea eax, [esi + 6]
push eax
push 0x4fa230
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fa104], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x58
jne 0x43bab2
lea eax, [esi + 6]
push eax
push 0x4fa438
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fa104], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4f
jne 0x43bad8
lea eax, [esi + 6]
push eax
push 0x4fa640
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4c
jne 0x43bb29
movzx eax, word [esi + 4]
cmp ax, 0x30
jb 0x43bb08
cmp ax, 0x39
ja 0x43bb08
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
mov dword [0x506bac], eax
lea eax, [esi + 8]
jmp 0x43bb15
mov dword [0x506bac], 3
lea eax, [esi + 6]
push eax
push 0x506bb0
call ebx
xor eax, eax
inc eax
mov dword [esp + 0x18], eax
mov dword [0x506db8], eax
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x46
jne 0x43bb41
xor eax, eax
inc eax
mov dword [0x506dc0], eax
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], ebp
je 0x43bbfc
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x20]
jl 0x43b9f7
mov esi, 0x4f9600
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x43bb9f
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x43bb9f
push str.stdout
push 0x4fa230
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fa104], 1
cmp dword [0x4fa104], ebp
jne 0x43bc5a
push edi
push ebp
push str.OneInstance
push 0x44d58c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
push 0x9dc1
mov dword [0x4fc594], eax
call fcn.0042d7c3
cmp dword [0x4fc594], ebp
je 0x43bc5a
push esi
push str..xml
push dword [0x492a18]
push str.32770
call fcn.00427978
cmp eax, ebp
je 0x43bc5a
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x43bc52
xor eax, eax
cmp word [esi + 2], 0x3f
sete al
mov esi, eax
mov eax, 0x44b295
cmp esi, ebp
jne 0x43bc16
mov eax, str.Error:_Invalid_Commandline_n_n
push eax
lea eax, [esp + 0x16c]
push str._sUsage:_n_nUsbTreeView___R___X___O___L__n_n_Options_in_Detail:_n__RReportFile_tWrite_a_text_report_n__XReportFile_tWrite_an_XML_report_n__OReportFile_tOpen_an_XML_report_n__LLogFileName_tWrite_a_log_file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
neg esi
sbb esi, esi
and esi, 0x30
add esi, 0x10
push esi
push 0x44d534
lea eax, [esp + 0x170]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
inc eax
jmp 0x43c396
call fcn.00445772
cmp dword [0x506db8], ebp
je 0x43bd0d
push str._Win32_
push 0x4f9f04
xor ebx, ebx
push str.________UsbTreeView_V_s__S________
inc ebx
push ebx
call fcn.004453fb
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push dword [0x4f9b58]
push dword [0x4f9b5c]
push 0x4f9b80
push dword [0x4f9b54]
push dword [0x4f9b50]
push dword [0x4f9b4c]
push dword [0x4f9b48]
push str.OS_version_u._u._u__SP_u___s_suite_X_type_i_acp_u
push ebx
call fcn.004453fb
add esp, 0x28
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHLWAPI.dll_PathGetArgsW]
push eax
push str.cmdln_s
push ebx
call fcn.004453fb
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0xc
push 0xfffffffffffffff5
call esi
test eax, eax
je 0x43bd0d
push 0xfffffffffffffff5
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
push eax
push 0xfffffffffffffff5
call esi
push eax
push str.stdout0x_08Ix_filetype_u
push ebx
call fcn.004453fb
add esp, 0x10
call fcn.00447bbb
push 0x194
call fcn.0043f641
pop ecx
cmp eax, ebp
je 0x43bd2f
mov ecx, eax
call fcn.0040c2ec
mov dword [0x4fc53c], eax
jmp 0x43bd35
mov dword [0x4fc53c], ebp
push 0x4014
call fcn.0043f641
pop ecx
cmp eax, ebp
je 0x43bd58
push dword [0x4fc53c]
mov ecx, eax
call fcn.00406f06
mov dword [0x4fc540], eax
jmp 0x43bd5e
mov dword [0x4fc540], ebp
push 0x4020
call fcn.0043f641
pop ecx
cmp eax, ebp
je 0x43bd81
push dword [0x4fc53c]
mov ecx, eax
call fcn.00401248
mov dword [0x4fc544], eax
jmp 0x43bd87
mov dword [0x4fc544], ebp
push 0x24
call fcn.0043f641
pop ecx
cmp eax, ebp
je 0x43bda1
mov ecx, eax
call fcn.0043ca27
mov dword [0x4fc548], eax
jmp 0x43bda7
mov dword [0x4fc548], ebp
push 0x30
call fcn.0043f641
pop ecx
cmp eax, ebp
je 0x43bdc1
mov ecx, eax
call fcn.0043f018
mov dword [0x4fc54c], eax
jmp 0x43bdc7
mov dword [0x4fc54c], ebp
push 0x1ac
call fcn.0043f641
pop ecx
cmp eax, ebp
je 0x43bde4
mov ecx, eax
call fcn.0043d4aa
mov dword [0x4fc550], eax
jmp 0x43bdea
mov dword [0x4fc550], ebp
push 0x6a
push dword [0x4fa13c]
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebp
mov dword [0x4fa184], eax
call fcn.0040c60a
push dword [esp + 0x578]
call fcn.0043b398
test eax, eax
jne 0x43be1b
push 2
pop eax
jmp 0x43c396
push 0x20
call fcn.00428559
mov esi, dword [sym.imp.USER32.dll_LoadImageW]
mov ebx, 0x8000
push ebx
push eax
push eax
push 1
push 0x6e
push dword [0x4fa13c]
call esi
push 0x10
mov dword [0x4fa1ac], eax
call fcn.00428559
push ebx
push eax
push eax
push 1
push 0x6e
push dword [0x4fa13c]
call esi
push dword [0x4fa1ac]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
mov ebx, 0x80
push ebx
push dword [0x4fa140]
mov dword [0x4fa1b0], eax
call esi
push dword [0x4fa1b0]
push ebp
push ebx
push dword [0x4fa140]
call esi
push edi
push 1
push str.ShowVerInCaption
push 0x44d58c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x43bf63
xor eax, eax
push 0x7e
mov word [esp + 0x6c], ax
lea eax, [esp + 0x6e]
push ebp
push eax
call fcn.0043f481
add esp, 0xc
push 0x3f
lea eax, [esp + 0x6c]
push eax
push dword [0x4fa140]
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, ebp
je 0x43bf63
mov cx, word [0x4f9efe]
lea eax, [esp + eax*2 + 0x68]
cmp cx, 0xa
jb 0x43bf13
movzx ecx, cx
push ecx
movzx ecx, word [0x4f9efc]
push ecx
movzx ecx, word [0x4f9efa]
push ecx
movzx ecx, word [0x4f9ef8]
push ecx
push str._V_u._u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
jmp 0x43bf3a
movzx ecx, word [0x4f9efc]
push ecx
movzx ecx, word [0x4f9efa]
push ecx
movzx ecx, word [0x4f9ef8]
push ecx
push str._V_u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
cmp dword [0x4f9b6c], ebp
je 0x43bf52
push str.___Win32_
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x68]
push eax
push dword [0x4fa140]
call dword [sym.imp.USER32.dll_SetWindowTextW]
call dword [sym.imp.USER32.dll_CreateMenu]
mov esi, dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [0x4fc5c8], eax
call esi
mov dword [0x4fc5cc], eax
call esi
mov dword [0x4fc5d0], eax
call esi
mov dword [0x4fc5d4], eax
call esi
mov dword [0x4fc5d8], eax
call esi
mov dword [0x4fc5dc], eax
call esi
mov dword [0x4fc5e0], eax
call esi
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
mov edi, str.Pop
push edi
push dword [0x4fc5cc]
mov dword [0x4fc5e4], eax
push 0x10
pop ebx
push ebx
push dword [0x4fc5c8]
call esi
push edi
push dword [0x4fc5dc]
push ebx
push dword [0x4fc5c8]
call esi
push edi
push dword [0x4fc5e0]
push ebx
push dword [0x4fc5c8]
call esi
push edi
push dword [0x4fc5e4]
push ebx
push dword [0x4fc5c8]
call esi
push str.DevId
push 0xa4d8
push ebp
push dword [0x4fc5d4]
call esi
push str.Safely_Remove
push 0xa488
push ebp
push dword [0x4fc5cc]
call esi
push str.Restart_Device
push 0xa489
push ebp
push dword [0x4fc5cc]
call esi
mov ebx, 0x450f98
push ebx
push ebp
mov edi, 0x800
push edi
push dword [0x4fc5cc]
call esi
push str.Restart_Port
push 0xa48a
push ebp
push dword [0x4fc5cc]
call esi
push ebx
push ebp
push edi
push dword [0x4fc5cc]
call esi
push str.Copy_Tree_from_here
push dword [0x4fc5d0]
push 0x10
push dword [0x4fc5cc]
call esi
push 0x46bee4
push 0xa474
push ebp
push dword [0x4fc5d0]
call esi
push 0x46bed4
push 0xa475
push ebp
push dword [0x4fc5d0]
call esi
push str.Copy_Report_from_here
push 0xa476
push ebp
push dword [0x4fc5cc]
call esi
push str.Copy...
push dword [0x4fc5d4]
push 0x10
push dword [0x4fc5cc]
call esi
push ebx
push ebp
push edi
push dword [0x4fc5cc]
call esi
push str.Regedit...
push dword [0x4fc5d8]
push 0x10
push dword [0x4fc5cc]
call esi
push ebx
push ebp
push edi
push dword [0x4fc5cc]
call esi
push str.Device_Properties
push 0xa492
push ebp
push dword [0x4fc5cc]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fc5dc]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fc5dc]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fc5dc]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fc5e0]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x4fc5e0]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fc5e0]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fc5e0]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fc5e4]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x4fc5e4]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fc5e4]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fc5e4]
call esi
push 0x6b
push dword [0x4fa13c]
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x4fa1b4], eax
jmp 0x43c22b
cmp esi, 0xffffffff
je 0x43c23b
lea eax, [esp + 0x34]
push eax
push dword [0x4fa1b4]
push dword [0x4fa140]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x43c22b
lea eax, [esp + 0x34]
push eax
push dword [0x4fa140]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x43c22b
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push ebp
push ebp
push ebp
lea eax, [esp + 0x40]
push eax
call edi
mov esi, eax
cmp esi, ebp
jne 0x43c1e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push dword [esp + 0x40]
xor edi, edi
push str.lastmsg_u__res_i_err_u
inc edi
push edi
call fcn.004453fb
add esp, 0x14
push ebp
push ebp
call fcn.0042cde2
call fcn.0044324d
mov esi, 0x4fa0cc
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call esi
push 0x4fa0e4
call esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push ebp
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebp
je 0x43c348
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessTimes]
test eax, eax
je 0x43c341
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
sbb ecx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x18], ecx
call fcn.00427510
push eax
push str.timerunning_s
push edi
call fcn.004453fb
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
call fcn.00427510
push eax
push str.timekernel__s
push edi
call fcn.004453fb
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call fcn.00427510
push eax
push str.timeuser____s
push edi
call fcn.004453fb
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00447af8
call fcn.0042451f
call fcn.004458ca
call fcn.004469a9
mov eax, dword [0x4fc5c0]
cmp eax, ebp
je 0x43c36c
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.0042cbe4
cmp word [0x4fa230], bp
jne 0x43c383
cmp word [0x4fa438], bp
je 0x43c391
cmp dword [0x4fa848], ebp
jne 0x43c391
mov dword [0x4fa84c], edi
mov eax, dword [0x4fa84c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x558
ret 0x10