Function at 0x43f121
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 [0x50cc18], eax
mov eax, dword [esp + 0x55c]
push str.psapi.dll
mov dword [0x5010b8], eax
call fcn.004272fe
mov dword [0x50357c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x500f9c], eax
call fcn.00425ef5
test eax, eax
je 0x43f16d
mov dword [0x5010b0], 1
jmp 0x43f172
call fcn.00425ed8
push ebx
push ebp
push esi
push edi
call fcn.0042e7ff
push 0x500aa8
call fcn.0042b337
call fcn.0042b315
call fcn.00428ec1
call fcn.00445fbe
push 0x40
push 0x500bd0
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
push 0x40
push 0x500770
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, 0x500568
push esi
call fcn.00429d60
push 0x500c58
push esi
call fcn.00427e6c
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
mov edi, 0x5007f0
push edi
call ebx
push str..ini
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
call fcn.0042a5e5
push edi
push dword [0x50107c]
mov ebp, 0x450eac
push str.ShowDebug
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push 0xffffffffffffffff
push str.DpiAwareness
push ebp
mov dword [0x50106c], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [0x498ab4], eax
cmp eax, 0xffffffff
jne 0x43f22f
push 4
pop eax
push edi
push eax
push str.DpiAwareness
push ebp
mov dword [0x498ab4], eax
call fcn.00427eed
push dword [0x498ab4]
call fcn.0042a845
cmp dword [0x498ab4], 4
jl 0x43f24d
call fcn.0042beee
mov dword [0x498ab8], eax
push str.Riched32.dll
call fcn.004272fe
xor ebp, ebp
mov dword [0x5010b4], eax
cmp eax, ebp
jne 0x43f26c
mov eax, 0xfe
jmp 0x43fc88
call fcn.0044a71e
push 0x50103c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x501054
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x500e60
push esi
call fcn.0042658e
push 0x40
push 0x5004e8
push str._COMPUTERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x40
push 0x500468
push str._USERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.0042734c
mov dword [0x5010a8], eax
call fcn.0042737c
push edi
push 1
push str.CrashDump
push 0x450eac
mov dword [0x5010ac], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x43f2f8
push 0x442fce
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00442b73
xor eax, eax
inc eax
cmp dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
jle 0x43f492
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 0x43f52d
movzx eax, word [esi]
cmp ax, 0x2d
je 0x43f34d
cmp ax, 0x2f
jne 0x43f52d
movzx eax, word [esi + 4]
cmp ax, bp
je 0x43f376
cmp ax, 0x3a
je 0x43f376
movzx ecx, word [esi + 6]
cmp cx, 0x3a
je 0x43f376
cmp ax, 0x3d
je 0x43f376
cmp cx, 0x3d
jne 0x43f52d
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x52
jne 0x43f3a6
lea eax, [esi + 6]
push eax
push 0x5011e8
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x501074], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x58
jne 0x43f3d6
lea eax, [esi + 6]
push eax
push 0x5013f0
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x501074], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4f
jne 0x43f3fc
lea eax, [esi + 6]
push eax
push 0x5015f8
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4c
jne 0x43f459
cmp dword [0x500ac0], 0x500
jbe 0x43f459
movzx eax, word [esi + 4]
cmp ax, 0x30
jb 0x43f438
cmp ax, 0x39
ja 0x43f438
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
mov dword [0x50da14], eax
lea eax, [esi + 8]
jmp 0x43f445
mov dword [0x50da14], 3
lea eax, [esi + 6]
push eax
push 0x50da18
call ebx
xor eax, eax
inc eax
mov dword [esp + 0x18], eax
mov dword [0x50dc20], eax
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x46
jne 0x43f471
xor eax, eax
inc eax
mov dword [0x50dc28], eax
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], ebp
je 0x43f52d
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x20]
jl 0x43f31b
mov esi, 0x500568
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x43f4cf
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x43f4cf
push str.stdout
push 0x5011e8
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x501074], 1
mov ebx, 0x450eac
cmp dword [0x501074], ebp
jne 0x43f58b
push edi
push ebp
push str.OneInstance
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
push 0x9dc1
mov dword [0x503550], eax
call fcn.0042f5e2
cmp dword [0x503550], ebp
je 0x43f58b
push esi
push str..xml
push dword [0x498aa0]
push str.32770
call fcn.00429494
cmp eax, ebp
je 0x43f58b
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x43f583
xor eax, eax
cmp word [esi + 2], 0x3f
sete al
mov esi, eax
mov eax, 0x44e735
cmp esi, ebp
jne 0x43f547
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 0x450e54
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 0x43fc88
call fcn.00448b15
cmp dword [0x50dc20], ebp
je 0x43f63f
push str._Win32_
push 0x500e6c
push str.________UsbTreeView_V_s__S________
push 1
call fcn.004487a4
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push dword [0x500ab8]
push dword [0x500abc]
push 0x500ae0
push dword [0x500ab4]
push dword [0x500ab0]
push dword [0x500aac]
push dword [0x500aa8]
push str.OS_version_u._u._u__SP_u___s_suite_X_type_i_acp_u
push 1
call fcn.004487a4
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.004487a4
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0xc
push 0xfffffffffffffff5
call esi
test eax, eax
je 0x43f63f
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 1
call fcn.004487a4
add esp, 0x10
call fcn.0044b079
push 0x194
call fcn.00442eef
pop ecx
cmp eax, ebp
je 0x43f661
mov ecx, eax
call fcn.0040ce02
mov dword [0x5034f4], eax
jmp 0x43f667
mov dword [0x5034f4], ebp
push 0x4014
call fcn.00442eef
pop ecx
cmp eax, ebp
je 0x43f68a
push dword [0x5034f4]
mov ecx, eax
call fcn.004072a6
mov dword [0x5034f8], eax
jmp 0x43f690
mov dword [0x5034f8], ebp
push 0x4028
call fcn.00442eef
pop ecx
cmp eax, ebp
je 0x43f6b3
push dword [0x5034f4]
mov ecx, eax
call fcn.004012c3
mov dword [0x5034fc], eax
jmp 0x43f6b9
mov dword [0x5034fc], ebp
push 0x24
call fcn.00442eef
pop ecx
cmp eax, ebp
je 0x43f6d3
mov ecx, eax
call fcn.004402c9
mov dword [0x503500], eax
jmp 0x43f6d9
mov dword [0x503500], ebp
push 0x30
call fcn.00442eef
pop ecx
cmp eax, ebp
je 0x43f6f3
mov ecx, eax
call fcn.004428c6
mov dword [0x503504], eax
jmp 0x43f6f9
mov dword [0x503504], ebp
push 0x1ac
call fcn.00442eef
pop ecx
cmp eax, ebp
je 0x43f716
mov ecx, eax
call fcn.00440d5a
mov dword [0x503508], eax
jmp 0x43f71c
mov dword [0x503508], ebp
push 0x6a
push dword [0x5010b8]
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebp
mov dword [0x501104], eax
call fcn.0040da98
push edi
call fcn.00443cb1
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
push str.DarkMode
push ebx
call esi
push dword [esp + 0x578]
mov dword [0x5010a4], eax
call fcn.0043ecdd
test eax, eax
jne 0x43f767
push 2
pop eax
jmp 0x43fc88
push edi
push 1
push str.ShowVerInCaption
push ebx
call esi
test eax, eax
je 0x43f83a
xor eax, eax
push 0x7e
mov word [esp + 0x6c], ax
lea eax, [esp + 0x6e]
push ebp
push eax
call fcn.00442d2f
add esp, 0xc
push 0x3f
lea eax, [esp + 0x6c]
push eax
push dword [0x5010bc]
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, ebp
je 0x43f83a
mov cx, word [0x500e66]
lea eax, [esp + eax*2 + 0x68]
cmp cx, 0xa
jb 0x43f7ea
movzx ecx, cx
push ecx
movzx ecx, word [0x500e64]
push ecx
movzx ecx, word [0x500e62]
push ecx
movzx ecx, word [0x500e60]
push ecx
push str._V_u._u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
jmp 0x43f811
movzx ecx, word [0x500e64]
push ecx
movzx ecx, word [0x500e62]
push ecx
movzx ecx, word [0x500e60]
push ecx
push str._V_u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
cmp dword [0x500acc], ebp
je 0x43f829
push str.___Win32_
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x68]
push eax
push dword [0x5010bc]
call dword [sym.imp.USER32.dll_SetWindowTextW]
call dword [sym.imp.USER32.dll_CreateMenu]
mov esi, dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [0x503584], eax
call esi
mov dword [0x503588], eax
call esi
mov dword [0x50358c], eax
call esi
mov dword [0x503590], eax
call esi
mov dword [0x503594], eax
call esi
mov dword [0x503598], eax
call esi
mov dword [0x50359c], eax
call esi
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
mov edi, str.Pop
push edi
push dword [0x503588]
mov dword [0x5035a0], eax
push 0x10
pop ebx
push ebx
push dword [0x503584]
call esi
push edi
push dword [0x503598]
push ebx
push dword [0x503584]
call esi
push edi
push dword [0x50359c]
push ebx
push dword [0x503584]
call esi
push edi
push dword [0x5035a0]
push ebx
push dword [0x503584]
call esi
push str.DevId
push 0xa4d8
push ebp
push dword [0x503590]
call esi
push str.Safely_Remove
push 0xa488
push ebp
push dword [0x503588]
call esi
push str.Restart_Device
push 0xa489
push ebp
push dword [0x503588]
call esi
mov ebx, 0x44e4b0
push ebx
push ebp
mov edi, 0x800
push edi
push dword [0x503588]
call esi
push str.Restart_Port
push 0xa48a
push ebp
push dword [0x503588]
call esi
push ebx
push ebp
push edi
push dword [0x503588]
call esi
push str.Copy_Tree_from_here
push dword [0x50358c]
push 0x10
push dword [0x503588]
call esi
push 0x4703d0
push 0xa474
push ebp
push dword [0x50358c]
call esi
push 0x4703c0
push 0xa475
push ebp
push dword [0x50358c]
call esi
push str.Copy_Report_from_here
push 0xa476
push ebp
push dword [0x503588]
call esi
push str.Copy...
push dword [0x503590]
push 0x10
push dword [0x503588]
call esi
push ebx
push ebp
push edi
push dword [0x503588]
call esi
push str.Regedit...
push dword [0x503594]
push 0x10
push dword [0x503588]
call esi
push ebx
push ebp
push edi
push dword [0x503588]
call esi
push str.Device_Properties
push 0xa492
push ebp
push dword [0x503588]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x503598]
call esi
push ebx
push 0xb602
push edi
push dword [0x503598]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x503598]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x50359c]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x50359c]
call esi
push ebx
push 0xb602
push edi
push dword [0x50359c]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x50359c]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x5035a0]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x5035a0]
call esi
push ebx
push 0xb602
push edi
push dword [0x5035a0]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x5035a0]
call esi
push 0x6b
push dword [0x5010b8]
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x501144], eax
jmp 0x43fb02
cmp esi, 0xffffffff
je 0x43fb12
lea eax, [esp + 0x34]
push eax
push dword [0x501144]
push dword [0x5010bc]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x43fb02
lea eax, [esp + 0x34]
push eax
push dword [0x5010bc]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x43fb02
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 0x43fab7
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.004487a4
add esp, 0x14
push ebp
push ebp
call fcn.0042eb47
mov eax, dword [0x4b6890]
cmp eax, ebp
je 0x43fb46
push eax
call fcn.00442f64
pop ecx
call fcn.00445ffb
mov esi, 0x50103c
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 0x501054
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 0x43fc2f
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 0x43fc28
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.0042902c
push eax
push str.timerunning_s
push edi
call fcn.004487a4
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
call fcn.0042902c
push eax
push str.timekernel__s
push edi
call fcn.004487a4
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call fcn.0042902c
push eax
push str.timeuser____s
push edi
call fcn.004487a4
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0044afb6
push 0x498ad4
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyClassImageList]
call fcn.00425e9c
call fcn.00448c6f
call fcn.00449d34
mov eax, dword [0x50357c]
cmp eax, ebp
je 0x43fc5e
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.0042e85a
cmp word [0x5011e8], bp
jne 0x43fc75
cmp word [0x5013f0], bp
je 0x43fc83
cmp dword [0x5011e4], ebp
jne 0x43fc83
mov dword [0x501800], edi
mov eax, dword [0x501800]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x558
ret 0x10