Function at 0x43c0fb
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 [0x506c3c], eax
mov eax, dword [esp + 0x55c]
push str.psapi.dll
mov dword [0x4fb1bc], eax
call fcn.00425ce3
mov dword [0x4fd640], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x4fb0b0], eax
call fcn.00424900
test eax, eax
je 0x43c147
mov dword [0x4fb1b4], 1
jmp 0x43c14c
call fcn.004248e3
push ebx
push ebp
push esi
push edi
call fcn.0042cf43
push 0x4fabc0
call fcn.00429b5b
call fcn.00429b39
call fcn.00427719
call fcn.00443b46
push 0x40
push 0x4face8
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
push 0x40
push 0x4fa888
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, 0x4fa680
push esi
call fcn.004286c1
push 0x4fad68
push esi
call fcn.004267f7
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
mov edi, 0x4fa908
push edi
call ebx
push str..ini
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
call fcn.00428f1a
push edi
push dword [0x4fb18c]
mov ebp, 0x44e6b4
push str.ShowDebug
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push 0xffffffffffffffff
push str.DpiAwareness
push ebp
mov dword [0x4fb17c], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [0x493a2c], eax
cmp eax, 0xffffffff
jne 0x43c209
push 4
pop eax
push edi
push eax
push str.DpiAwareness
push ebp
mov dword [0x493a2c], eax
call fcn.00426878
push dword [0x493a2c]
call fcn.0042917a
cmp dword [0x493a2c], 4
jl 0x43c227
call fcn.0042a6ba
mov dword [0x493a30], eax
push str.Riched32.dll
call fcn.00425ce3
xor ebp, ebp
mov dword [0x4fb1b8], eax
cmp eax, ebp
jne 0x43c246
mov eax, 0xfe
jmp 0x43ccab
call fcn.00447d82
push 0x4fb14c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4fb164
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x4faf70
push esi
call fcn.00424f97
push 0x40
push 0x4fa600
push str._COMPUTERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x40
push 0x4fa580
push str._USERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.00425d31
mov dword [0x4fb1ac], eax
call fcn.00425d61
push edi
push 1
push str.CrashDump
push 0x44e6b4
mov dword [0x4fb1b0], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x43c2d2
push 0x440033
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0043fbd8
xor eax, eax
inc eax
cmp dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
jle 0x43c46c
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 0x43c506
movzx eax, word [esi]
cmp ax, 0x2d
je 0x43c327
cmp ax, 0x2f
jne 0x43c506
movzx eax, word [esi + 4]
cmp ax, bp
je 0x43c350
cmp ax, 0x3a
je 0x43c350
movzx ecx, word [esi + 6]
cmp cx, 0x3a
je 0x43c350
cmp ax, 0x3d
je 0x43c350
cmp cx, 0x3d
jne 0x43c506
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x52
jne 0x43c380
lea eax, [esi + 6]
push eax
push 0x4fb2b0
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fb184], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x58
jne 0x43c3b0
lea eax, [esi + 6]
push eax
push 0x4fb4b8
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fb184], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4f
jne 0x43c3d6
lea eax, [esi + 6]
push eax
push 0x4fb6c0
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4c
jne 0x43c433
cmp dword [0x4fabd8], 0x500
jbe 0x43c433
movzx eax, word [esi + 4]
cmp ax, 0x30
jb 0x43c412
cmp ax, 0x39
ja 0x43c412
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
mov dword [0x507a24], eax
lea eax, [esi + 8]
jmp 0x43c41f
mov dword [0x507a24], 3
lea eax, [esi + 6]
push eax
push 0x507a28
call ebx
xor eax, eax
inc eax
mov dword [esp + 0x18], eax
mov dword [0x507c30], eax
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x46
jne 0x43c44b
xor eax, eax
inc eax
mov dword [0x507c38], eax
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], ebp
je 0x43c506
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x20]
jl 0x43c2f5
mov esi, 0x4fa680
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x43c4a9
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x43c4a9
push str.stdout
push 0x4fb2b0
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fb184], 1
cmp dword [0x4fb184], ebp
jne 0x43c564
push edi
push ebp
push str.OneInstance
push 0x44e6b4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
push 0x9dc1
mov dword [0x4fd614], eax
call fcn.0042dc05
cmp dword [0x4fd614], ebp
je 0x43c564
push esi
push str..xml
push dword [0x493a18]
push str.32770
call fcn.00427cec
cmp eax, ebp
je 0x43c564
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x43c55c
xor eax, eax
cmp word [esi + 2], 0x3f
sete al
mov esi, eax
mov eax, 0x44c315
cmp esi, ebp
jne 0x43c520
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 0x44e65c
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 0x43ccab
call fcn.00446282
cmp dword [0x507c30], ebp
je 0x43c617
push str._Win32_
push 0x4faf7c
xor ebx, ebx
push str.________UsbTreeView_V_s__S________
inc ebx
push ebx
call fcn.00445f0b
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push dword [0x4fabd0]
push dword [0x4fabd4]
push 0x4fabf8
push dword [0x4fabcc]
push dword [0x4fabc8]
push dword [0x4fabc4]
push dword [0x4fabc0]
push str.OS_version_u._u._u__SP_u___s_suite_X_type_i_acp_u
push ebx
call fcn.00445f0b
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.00445f0b
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0xc
push 0xfffffffffffffff5
call esi
test eax, eax
je 0x43c617
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.00445f0b
add esp, 0x10
call fcn.004486d1
push 0x194
call fcn.0043ff54
pop ecx
cmp eax, ebp
je 0x43c639
mov ecx, eax
call fcn.0040c6dc
mov dword [0x4fd5bc], eax
jmp 0x43c63f
mov dword [0x4fd5bc], ebp
push 0x4014
call fcn.0043ff54
pop ecx
cmp eax, ebp
je 0x43c662
push dword [0x4fd5bc]
mov ecx, eax
call fcn.00406fa4
mov dword [0x4fd5c0], eax
jmp 0x43c668
mov dword [0x4fd5c0], ebp
push 0x4020
call fcn.0043ff54
pop ecx
cmp eax, ebp
je 0x43c68b
push dword [0x4fd5bc]
mov ecx, eax
call fcn.00401255
mov dword [0x4fd5c4], eax
jmp 0x43c691
mov dword [0x4fd5c4], ebp
push 0x24
call fcn.0043ff54
pop ecx
cmp eax, ebp
je 0x43c6ab
mov ecx, eax
call fcn.0043d33c
mov dword [0x4fd5c8], eax
jmp 0x43c6b1
mov dword [0x4fd5c8], ebp
push 0x30
call fcn.0043ff54
pop ecx
cmp eax, ebp
je 0x43c6cb
mov ecx, eax
call fcn.0043f92b
mov dword [0x4fd5cc], eax
jmp 0x43c6d1
mov dword [0x4fd5cc], ebp
push 0x1ac
call fcn.0043ff54
pop ecx
cmp eax, ebp
je 0x43c6ee
mov ecx, eax
call fcn.0043ddbf
mov dword [0x4fd5d0], eax
jmp 0x43c6f4
mov dword [0x4fd5d0], ebp
push 0x6a
push dword [0x4fb1bc]
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebp
mov dword [0x4fb204], eax
call fcn.0040ca20
push dword [esp + 0x578]
call fcn.0043bc7d
test eax, eax
jne 0x43c725
push 2
pop eax
jmp 0x43ccab
push 0x20
call fcn.004288cd
mov esi, dword [sym.imp.USER32.dll_LoadImageW]
mov ebx, 0x8000
push ebx
push eax
push eax
push 1
push 0x6e
push dword [0x4fb1bc]
call esi
push 0x10
mov dword [0x4fb22c], eax
call fcn.004288cd
push ebx
push eax
push eax
push 1
push 0x6e
push dword [0x4fb1bc]
call esi
push dword [0x4fb22c]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
mov ebx, 0x80
push ebx
push dword [0x4fb1c0]
mov dword [0x4fb230], eax
call esi
push dword [0x4fb230]
push ebp
push ebx
push dword [0x4fb1c0]
call esi
push edi
push 1
push str.ShowVerInCaption
push 0x44e6b4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x43c86d
xor eax, eax
push 0x7e
mov word [esp + 0x6c], ax
lea eax, [esp + 0x6e]
push ebp
push eax
call fcn.0043fd94
add esp, 0xc
push 0x3f
lea eax, [esp + 0x6c]
push eax
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, ebp
je 0x43c86d
mov cx, word [0x4faf76]
lea eax, [esp + eax*2 + 0x68]
cmp cx, 0xa
jb 0x43c81d
movzx ecx, cx
push ecx
movzx ecx, word [0x4faf74]
push ecx
movzx ecx, word [0x4faf72]
push ecx
movzx ecx, word [0x4faf70]
push ecx
push str._V_u._u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
jmp 0x43c844
movzx ecx, word [0x4faf74]
push ecx
movzx ecx, word [0x4faf72]
push ecx
movzx ecx, word [0x4faf70]
push ecx
push str._V_u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
cmp dword [0x4fabe4], ebp
je 0x43c85c
push str.___Win32_
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x68]
push eax
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_SetWindowTextW]
call dword [sym.imp.USER32.dll_CreateMenu]
mov esi, dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [0x4fd648], eax
call esi
mov dword [0x4fd64c], eax
call esi
mov dword [0x4fd650], eax
call esi
mov dword [0x4fd654], eax
call esi
mov dword [0x4fd658], eax
call esi
mov dword [0x4fd65c], eax
call esi
mov dword [0x4fd660], eax
call esi
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
mov edi, str.Pop
push edi
push dword [0x4fd64c]
mov dword [0x4fd664], eax
push 0x10
pop ebx
push ebx
push dword [0x4fd648]
call esi
push edi
push dword [0x4fd65c]
push ebx
push dword [0x4fd648]
call esi
push edi
push dword [0x4fd660]
push ebx
push dword [0x4fd648]
call esi
push edi
push dword [0x4fd664]
push ebx
push dword [0x4fd648]
call esi
push str.DevId
push 0xa4d8
push ebp
push dword [0x4fd654]
call esi
push str.Safely_Remove
push 0xa488
push ebp
push dword [0x4fd64c]
call esi
push str.Restart_Device
push 0xa489
push ebp
push dword [0x4fd64c]
call esi
mov ebx, 0x4520e0
push ebx
push ebp
mov edi, 0x800
push edi
push dword [0x4fd64c]
call esi
push str.Restart_Port
push 0xa48a
push ebp
push dword [0x4fd64c]
call esi
push ebx
push ebp
push edi
push dword [0x4fd64c]
call esi
push str.Copy_Tree_from_here
push dword [0x4fd650]
push 0x10
push dword [0x4fd64c]
call esi
push 0x46d3ac
push 0xa474
push ebp
push dword [0x4fd650]
call esi
push 0x46d39c
push 0xa475
push ebp
push dword [0x4fd650]
call esi
push str.Copy_Report_from_here
push 0xa476
push ebp
push dword [0x4fd64c]
call esi
push str.Copy...
push dword [0x4fd654]
push 0x10
push dword [0x4fd64c]
call esi
push ebx
push ebp
push edi
push dword [0x4fd64c]
call esi
push str.Regedit...
push dword [0x4fd658]
push 0x10
push dword [0x4fd64c]
call esi
push ebx
push ebp
push edi
push dword [0x4fd64c]
call esi
push str.Device_Properties
push 0xa492
push ebp
push dword [0x4fd64c]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fd65c]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fd65c]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fd65c]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fd660]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x4fd660]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fd660]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fd660]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fd664]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x4fd664]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fd664]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fd664]
call esi
push 0x6b
push dword [0x4fb1bc]
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x4fb234], eax
jmp 0x43cb35
cmp esi, 0xffffffff
je 0x43cb45
lea eax, [esp + 0x34]
push eax
push dword [0x4fb234]
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x43cb35
lea eax, [esp + 0x34]
push eax
push dword [0x4fb1c0]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x43cb35
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 0x43caea
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.00445f0b
add esp, 0x14
push ebp
push ebp
call fcn.0042d224
call fcn.00443b81
mov esi, 0x4fb14c
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 0x4fb164
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 0x43cc52
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 0x43cc4b
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.00427884
push eax
push str.timerunning_s
push edi
call fcn.00445f0b
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
call fcn.00427884
push eax
push str.timekernel__s
push edi
call fcn.00445f0b
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call fcn.00427884
push eax
push str.timeuser____s
push edi
call fcn.00445f0b
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0044860e
push 0x493a38
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyClassImageList]
call fcn.004248a7
call fcn.004463da
call fcn.004474bc
mov eax, dword [0x4fd640]
cmp eax, ebp
je 0x43cc81
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.0042cf9e
cmp word [0x4fb2b0], bp
jne 0x43cc98
cmp word [0x4fb4b8], bp
je 0x43cca6
cmp dword [0x4fb8c8], ebp
jne 0x43cca6
mov dword [0x4fb8cc], edi
mov eax, dword [0x4fb8cc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x558
ret 0x10