Function at 0x442b5d
Capabilities:
Accept command line arguments
Get common file path
Get graphical window text
Query environment variable
Read .ini file

Disassembly:
sub esp, 0x558
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x514a98], eax
mov eax, dword [esp + 0x55c]
push str.psapi.dll
mov dword [0x508d20], eax
call fcn.00428887
mov dword [0x50b3f4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x508bfc], eax
call fcn.004274b0
test eax, eax
je 0x442ba9
mov dword [0x508d18], 1
jmp 0x442bae
call fcn.00427493
push ebx
push ebp
push esi
push edi
call fcn.00430f07
push 0x508708
call fcn.0042d7f3
call fcn.0042d7d1
call fcn.0042abe7
call fcn.00449f6d
push 0x40
push 0x508830
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
push 0x40
push 0x508318
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, 0x508110
push esi
call fcn.0042ba86
push 0x5088b8
push esi
call fcn.00429471
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
mov edi, 0x508398
push edi
call ebx
push str..ini
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
call fcn.0042c3ae
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push dword [0x508ce0]
mov esi, 0x45548c
push str.ShowDebug
push esi
call ebp
push edi
push 0xffffffffffffffff
push str.DpiAwareness
push esi
mov dword [0x508cd0], eax
call ebp
push 4
mov dword [0x4a0ab8], eax
pop ebp
cmp eax, 0xffffffff
jne 0x442c6a
push edi
push ebp
push str.DpiAwareness
push esi
mov dword [0x4a0ab8], ebp
call fcn.004294f2
push dword [0x4a0ab8]
call fcn.0042c60e
cmp dword [0x4a0ab8], ebp
jl 0x442c91
call fcn.0042e3c2
mov dword [0x4a0abc], eax
call fcn.0042e417
mov dword [0x4a0ab0], eax
push str.Riched32.dll
call fcn.00428887
xor ebp, ebp
mov dword [0x508d1c], eax
cmp eax, ebp
jne 0x442cb0
mov eax, 0xfe
jmp 0x443753
call fcn.0044e717
push 0x508c9c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x508cb4
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x508ac0
push 0x508110
call fcn.00427b47
push 0x40
push 0x508090
push str._COMPUTERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x40
push 0x508010
push str._USERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.004288d5
mov dword [0x508d10], eax
call fcn.00428905
push edi
push 1
push str.CrashDump
push esi
mov dword [0x508d14], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x442d3c
push 0x446e4c
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00446a03
xor eax, eax
inc eax
cmp dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
jle 0x442f14
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 0x442fd6
movzx eax, word [esi]
cmp ax, 0x2d
je 0x442d91
cmp ax, 0x2f
jne 0x442fd6
movzx eax, word [esi + 4]
cmp ax, bp
je 0x442dba
cmp ax, 0x3a
je 0x442dba
movzx ecx, word [esi + 6]
cmp cx, 0x3a
je 0x442dba
cmp ax, 0x3d
je 0x442dba
cmp cx, 0x3d
jne 0x442fd6
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x5a
je 0x442fb4
cmp eax, 0x52
jne 0x442df3
lea eax, [esi + 6]
push eax
push 0x509058
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x508cd8], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x58
jne 0x442e23
lea eax, [esi + 6]
push eax
push 0x509260
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x508cd8], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4f
jne 0x442e49
lea eax, [esi + 6]
push eax
push 0x509468
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4c
jne 0x442ea6
cmp dword [0x508720], 0x500
jbe 0x442ea6
movzx eax, word [esi + 4]
cmp ax, 0x30
jb 0x442e85
cmp ax, 0x39
ja 0x442e85
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
mov dword [0x515894], eax
lea eax, [esi + 8]
jmp 0x442e92
mov dword [0x515894], 3
lea eax, [esi + 6]
push eax
push 0x515898
call ebx
xor eax, eax
inc eax
mov dword [esp + 0x18], eax
mov dword [0x515aa0], eax
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x46
jne 0x442ebc
xor eax, eax
inc eax
mov dword [0x515aa8], eax
jmp 0x442ec0
mov eax, dword [esp + 0x18]
movzx ecx, word [esi + 2]
and ecx, 0xffffffdf
cmp ecx, 0x53
jne 0x442ef5
movzx eax, word [esi + 4]
cmp ax, 0x3a
je 0x442edc
cmp ax, 0x3d
jne 0x442ef2
lea eax, [esi + 6]
push eax
push 0x508e50
call ebx
push 0x508e50
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
xor eax, eax
inc eax
cmp eax, ebp
je 0x442fd6
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x20]
jl 0x442d5f
mov esi, 0x45548c
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x442f51
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x442f51
push str.stdout
push 0x509058
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x508cd8], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp dword [0x508cd8], ebp
jne 0x443034
push edi
push ebp
push str.OneInstance
push esi
call ebx
push eax
push 0x9dc1
mov dword [0x50b3c8], eax
call fcn.00431e5c
cmp dword [0x50b3c8], ebp
je 0x443034
push 0x508110
push str..xml
push dword [0x4a0aa8]
push str.32770
call fcn.0042b1ba
cmp eax, ebp
je 0x443034
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x44302c
add esi, 6
push esi
mov dword [0x515894], ebp
mov dword [0x515aa0], ebp
mov dword [0x515aa4], ebp
call fcn.0042e52a
xor eax, eax
jmp 0x443753
xor eax, eax
cmp word [esi + 2], 0x3f
sete al
mov esi, eax
mov eax, 0x452971
cmp esi, ebp
jne 0x442ff0
mov eax, str.Error:_Invalid_Commandline_n_n
push eax
lea eax, [esp + 0x16c]
push str._sUsage:_n_nUsbTreeView___S___R___X___O___L__n_n_Options_in_Detail:_n__S_SearchFor____tSet_a_search_string_n__R_ReportFile__tWrite_a_text_report_n__X_ReportFile__tWrite_an_XML_report_n__O_ReportFile__tOpen_an_XML_report_n__L_LogFileName__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 0x455434
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 0x443753
call fcn.0044cb0c
cmp dword [0x515aa0], ebp
je 0x4430ee
push str._Win32_
push 0x508acc
push str.________UsbTreeView_V_s__S________
push 1
call fcn.0044c79b
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push dword [0x508718]
push dword [0x50871c]
push 0x508740
push dword [0x508714]
push dword [0x508710]
push dword [0x50870c]
push dword [0x508708]
push str.OS_version_u._u._u__SP_u___s_suite_X_type_i_acp_u
push 1
call fcn.0044c79b
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 1
call fcn.0044c79b
add esp, 0xc
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x4430ee
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
push eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
push str.stdout0x_08Ix_filetype_u
push 1
call fcn.0044c79b
add esp, 0x10
call fcn.0044f072
push 0x194
call fcn.00446ca6
pop ecx
cmp eax, ebp
je 0x443110
mov ecx, eax
call fcn.0040db4e
mov dword [0x50b368], eax
jmp 0x443116
mov dword [0x50b368], ebp
push 0x4014
call fcn.00446ca6
pop ecx
cmp eax, ebp
je 0x443139
push dword [0x50b368]
mov ecx, eax
call fcn.00407a88
mov dword [0x50b36c], eax
jmp 0x44313f
mov dword [0x50b36c], ebp
push 0x4028
call fcn.00446ca6
pop ecx
cmp eax, ebp
je 0x443162
push dword [0x50b368]
mov ecx, eax
call fcn.004012df
mov dword [0x50b370], eax
jmp 0x443168
mov dword [0x50b370], ebp
push 0x24
call fcn.00446ca6
pop ecx
cmp eax, ebp
je 0x443182
mov ecx, eax
call fcn.004440f4
mov dword [0x50b374], eax
jmp 0x443188
mov dword [0x50b374], ebp
push 0x30
call fcn.00446ca6
pop ecx
cmp eax, ebp
je 0x4431a2
mov ecx, eax
call fcn.00446715
mov dword [0x50b378], eax
jmp 0x4431a8
mov dword [0x50b378], ebp
push 0x1ac
call fcn.00446ca6
pop ecx
cmp eax, ebp
je 0x4431c5
mov ecx, eax
call fcn.00444ba9
mov dword [0x50b37c], eax
jmp 0x4431cb
mov dword [0x50b37c], ebp
push 0x6a
push dword [0x508d20]
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebp
mov dword [0x508d70], eax
call fcn.0040e973
push edi
call fcn.00447bd2
push eax
push str.DarkMode
push esi
call ebx
push edi
push 1
push str.DarkScrl
push esi
mov dword [0x508d08], eax
call ebx
mov dword [0x508d0c], eax
cmp dword [0x508d08], ebp
je 0x44321a
mov dword [0x508d08], 1
push dword [esp + 0x578]
call fcn.00442724
test eax, eax
jne 0x443232
push 2
pop eax
jmp 0x443753
push edi
push 1
push str.ShowVerInCaption
push esi
call ebx
test eax, eax
je 0x443305
xor eax, eax
push 0x7e
mov word [esp + 0x6c], ax
lea eax, [esp + 0x6e]
push ebp
push eax
call fcn.00446b72
add esp, 0xc
push 0x3f
lea eax, [esp + 0x6c]
push eax
push dword [0x508d24]
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, ebp
je 0x443305
mov cx, word [0x508ac6]
lea eax, [esp + eax*2 + 0x68]
cmp cx, 0xa
jb 0x4432b5
movzx ecx, cx
push ecx
movzx ecx, word [0x508ac4]
push ecx
movzx ecx, word [0x508ac2]
push ecx
movzx ecx, word [0x508ac0]
push ecx
push str._V_u._u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
jmp 0x4432dc
movzx ecx, word [0x508ac4]
push ecx
movzx ecx, word [0x508ac2]
push ecx
movzx ecx, word [0x508ac0]
push ecx
push str._V_u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
cmp dword [0x50872c], ebp
je 0x4432f4
push str.___Win32_
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x68]
push eax
push dword [0x508d24]
call dword [sym.imp.USER32.dll_SetWindowTextW]
call dword [sym.imp.USER32.dll_CreateMenu]
mov esi, dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [0x50b3fc], eax
call esi
mov dword [0x50b400], eax
call esi
mov dword [0x50b404], eax
call esi
mov dword [0x50b408], eax
call esi
mov dword [0x50b40c], eax
call esi
mov dword [0x50b410], eax
call esi
mov dword [0x50b414], eax
call esi
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
mov edi, str.Pop
push edi
push dword [0x50b400]
mov dword [0x50b418], eax
push 0x10
pop ebx
push ebx
push dword [0x50b3fc]
call esi
push edi
push dword [0x50b410]
push ebx
push dword [0x50b3fc]
call esi
push edi
push dword [0x50b414]
push ebx
push dword [0x50b3fc]
call esi
push edi
push dword [0x50b418]
push ebx
push dword [0x50b3fc]
call esi
push str.DevId
push 0xa4d8
push ebp
push dword [0x50b408]
call esi
push str.Safely_Remove
push 0xa488
push ebp
push dword [0x50b400]
call esi
push str.Restart_Device
push 0xa489
push ebp
push dword [0x50b400]
call esi
mov ebx, 0x4526c8
push ebx
push ebp
mov edi, 0x800
push edi
push dword [0x50b400]
call esi
push str.Restart_Port
push 0xa48a
push ebp
push dword [0x50b400]
call esi
push ebx
push ebp
push edi
push dword [0x50b400]
call esi
push str.Copy_Tree_from_here
push dword [0x50b404]
push 0x10
push dword [0x50b400]
call esi
push 0x4778a0
push 0xa474
push ebp
push dword [0x50b404]
call esi
push 0x477890
push 0xa475
push ebp
push dword [0x50b404]
call esi
push str.Copy_Report_from_here
push 0xa476
push ebp
push dword [0x50b400]
call esi
push str.Copy...
push dword [0x50b408]
push 0x10
push dword [0x50b400]
call esi
push ebx
push ebp
push edi
push dword [0x50b400]
call esi
push str.Regedit...
push dword [0x50b40c]
push 0x10
push dword [0x50b400]
call esi
push ebx
push ebp
push edi
push dword [0x50b400]
call esi
push str.Device_Properties
push 0xa492
push ebp
push dword [0x50b400]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x50b410]
call esi
push ebx
push 0xb602
push edi
push dword [0x50b410]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x50b410]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x50b414]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x50b414]
call esi
push ebx
push 0xb602
push edi
push dword [0x50b414]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x50b414]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x50b418]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x50b418]
call esi
push ebx
push 0xb602
push edi
push dword [0x50b418]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x50b418]
call esi
push 0x6b
push dword [0x508d20]
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x508db4], eax
jmp 0x4435cd
cmp esi, 0xffffffff
je 0x4435dd
lea eax, [esp + 0x34]
push eax
push dword [0x508db4]
push dword [0x508d24]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x4435cd
lea eax, [esp + 0x34]
push eax
push dword [0x508d24]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x4435cd
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 0x443582
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.0044c79b
add esp, 0x14
push ebp
push ebp
call fcn.004312f0
mov eax, dword [0x4be8e0]
cmp eax, ebp
je 0x443611
push eax
call fcn.00446ce1
pop ecx
call fcn.00449fa9
mov esi, 0x508c9c
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 0x508cb4
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 0x4436fa
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 0x4436f3
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.0042ad52
push eax
push str.timerunning_s
push edi
call fcn.0044c79b
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
call fcn.0042ad52
push eax
push str.timekernel__s
push edi
call fcn.0044c79b
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call fcn.0042ad52
push eax
push str.timeuser____s
push edi
call fcn.0044c79b
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0044efaf
push 0x4a0ad8
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyClassImageList]
call fcn.0042741f
call fcn.0044cc66
call fcn.0044dd2d
mov eax, dword [0x50b3f4]
cmp eax, ebp
je 0x443729
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.00430f62
cmp word [0x509058], bp
jne 0x443740
cmp word [0x509260], bp
je 0x44374e
cmp dword [0x509670], ebp
jne 0x44374e
mov dword [0x509674], edi
mov eax, dword [0x509674]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x558
ret 0x10