Function at 0x43b870
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 [0x505fc4], eax
mov eax, dword [esp + 0x55c]
push str.psapi.dll
mov dword [0x4fa544], eax
call fcn.00425b62
mov dword [0x4fc9c8], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x4fa43c], eax
call fcn.0042476b
test eax, eax
je 0x43b8bc
mov dword [0x4fa53c], 1
jmp 0x43b8c6
call fcn.0042474e
call fcn.0042cdbc
push ebx
push ebp
push esi
push edi
push 0x4f9f50
call fcn.00429a4a
call fcn.00429a28
call fcn.00427607
call fcn.0044310b
push 0x40
push 0x4fa078
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
push 0x40
push 0x4f9c10
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, 0x4f9a08
push esi
call fcn.004285af
push 0x4fa0f8
push esi
call fcn.00426676
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
mov edi, 0x4f9c98
push edi
call ebx
push str..ini
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
call fcn.00428e08
push edi
push dword [0x4fa514]
mov ebp, 0x44d6b4
push str.ShowDebug
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push 0xffffffffffffffff
push str.DpiAwareness
push ebp
mov dword [0x4fa504], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [0x492a34], eax
cmp eax, 0xffffffff
jne 0x43b97e
push 4
pop eax
push edi
push eax
push str.DpiAwareness
push ebp
mov dword [0x492a34], eax
call fcn.004266f7
push dword [0x492a34]
call fcn.00429069
cmp dword [0x492a34], 4
jl 0x43b99c
call fcn.0042a5a8
mov dword [0x492a38], eax
push str.Riched32.dll
call fcn.00425b62
xor ebp, ebp
mov dword [0x4fa540], eax
cmp eax, ebp
jne 0x43b9bb
mov eax, 0xfe
jmp 0x43c3ef
call fcn.00447117
push 0x4fa4d4
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4fa4ec
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x4fa300
push esi
call fcn.00424e16
push 0x4f9988
call fcn.004248f3
call fcn.00425bb0
mov dword [0x4fa534], eax
call fcn.00425be0
push edi
push 1
push str.CrashDump
push 0x44d6b4
mov dword [0x4fa538], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x43ba2d
push 0x43f777
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0043f31c
xor eax, eax
inc eax
cmp dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
jle 0x43bbbb
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 0x43bc55
movzx eax, word [esi]
cmp ax, 0x2d
je 0x43ba82
cmp ax, 0x2f
jne 0x43bc55
movzx eax, word [esi + 4]
cmp ax, bp
je 0x43baab
cmp ax, 0x3a
je 0x43baab
movzx ecx, word [esi + 6]
cmp cx, 0x3a
je 0x43baab
cmp ax, 0x3d
je 0x43baab
cmp cx, 0x3d
jne 0x43bc55
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x52
jne 0x43badb
lea eax, [esi + 6]
push eax
push 0x4fa638
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fa50c], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x58
jne 0x43bb0b
lea eax, [esi + 6]
push eax
push 0x4fa840
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fa50c], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4f
jne 0x43bb31
lea eax, [esi + 6]
push eax
push 0x4faa48
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4c
jne 0x43bb82
movzx eax, word [esi + 4]
cmp ax, 0x30
jb 0x43bb61
cmp ax, 0x39
ja 0x43bb61
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
mov dword [0x506fb4], eax
lea eax, [esi + 8]
jmp 0x43bb6e
mov dword [0x506fb4], 3
lea eax, [esi + 6]
push eax
push 0x506fb8
call ebx
xor eax, eax
inc eax
mov dword [esp + 0x18], eax
mov dword [0x5071c0], eax
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x46
jne 0x43bb9a
xor eax, eax
inc eax
mov dword [0x5071c8], eax
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], ebp
je 0x43bc55
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x20]
jl 0x43ba50
mov esi, 0x4f9a08
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x43bbf8
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x43bbf8
push str.stdout
push 0x4fa638
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x4fa50c], 1
cmp dword [0x4fa50c], ebp
jne 0x43bcb3
push edi
push ebp
push str.OneInstance
push 0x44d6b4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
push 0x9dc1
mov dword [0x4fc99c], eax
call fcn.0042d9d5
cmp dword [0x4fc99c], ebp
je 0x43bcb3
push esi
push str..xml
push dword [0x492a20]
push str.32770
call fcn.00427bda
cmp eax, ebp
je 0x43bcb3
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x43bcab
xor eax, eax
cmp word [esi + 2], 0x3f
sete al
mov esi, eax
mov eax, 0x44b285
cmp esi, ebp
jne 0x43bc6f
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 0x44d65c
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 0x43c3ef
call fcn.0044561a
cmp dword [0x5071c0], ebp
je 0x43bd66
push str._Win32_
push 0x4fa30c
xor ebx, ebx
push str.________UsbTreeView_V_s__S________
inc ebx
push ebx
call fcn.004452a3
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push dword [0x4f9f60]
push dword [0x4f9f64]
push 0x4f9f88
push dword [0x4f9f5c]
push dword [0x4f9f58]
push dword [0x4f9f54]
push dword [0x4f9f50]
push str.OS_version_u._u._u__SP_u___s_suite_X_type_i_acp_u
push ebx
call fcn.004452a3
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.004452a3
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0xc
push 0xfffffffffffffff5
call esi
test eax, eax
je 0x43bd66
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.004452a3
add esp, 0x10
call fcn.00447a63
push 0x194
call fcn.0043f698
pop ecx
cmp eax, ebp
je 0x43bd88
mov ecx, eax
call fcn.0040c60f
mov dword [0x4fc944], eax
jmp 0x43bd8e
mov dword [0x4fc944], ebp
push 0x4014
call fcn.0043f698
pop ecx
cmp eax, ebp
je 0x43bdb1
push dword [0x4fc944]
mov ecx, eax
call fcn.0040733f
mov dword [0x4fc948], eax
jmp 0x43bdb7
mov dword [0x4fc948], ebp
push 0x4020
call fcn.0043f698
pop ecx
cmp eax, ebp
je 0x43bdda
push dword [0x4fc944]
mov ecx, eax
call fcn.00401246
mov dword [0x4fc94c], eax
jmp 0x43bde0
mov dword [0x4fc94c], ebp
push 0x24
call fcn.0043f698
pop ecx
cmp eax, ebp
je 0x43bdfa
mov ecx, eax
call fcn.0043ca80
mov dword [0x4fc950], eax
jmp 0x43be00
mov dword [0x4fc950], ebp
push 0x30
call fcn.0043f698
pop ecx
cmp eax, ebp
je 0x43be1a
mov ecx, eax
call fcn.0043f06f
mov dword [0x4fc954], eax
jmp 0x43be20
mov dword [0x4fc954], ebp
push 0x1ac
call fcn.0043f698
pop ecx
cmp eax, ebp
je 0x43be3d
mov ecx, eax
call fcn.0043d503
mov dword [0x4fc958], eax
jmp 0x43be43
mov dword [0x4fc958], ebp
push 0x6a
push dword [0x4fa544]
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebp
mov dword [0x4fa58c], eax
call fcn.0040c92d
push dword [esp + 0x578]
call fcn.0043b3f0
test eax, eax
jne 0x43be74
push 2
pop eax
jmp 0x43c3ef
push 0x20
call fcn.004287bb
mov esi, dword [sym.imp.USER32.dll_LoadImageW]
mov ebx, 0x8000
push ebx
push eax
push eax
push 1
push 0x6e
push dword [0x4fa544]
call esi
push 0x10
mov dword [0x4fa5b4], eax
call fcn.004287bb
push ebx
push eax
push eax
push 1
push 0x6e
push dword [0x4fa544]
call esi
push dword [0x4fa5b4]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
mov ebx, 0x80
push ebx
push dword [0x4fa548]
mov dword [0x4fa5b8], eax
call esi
push dword [0x4fa5b8]
push ebp
push ebx
push dword [0x4fa548]
call esi
push edi
push 1
push str.ShowVerInCaption
push 0x44d6b4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x43bfbc
xor eax, eax
push 0x7e
mov word [esp + 0x6c], ax
lea eax, [esp + 0x6e]
push ebp
push eax
call fcn.0043f4d8
add esp, 0xc
push 0x3f
lea eax, [esp + 0x6c]
push eax
push dword [0x4fa548]
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, ebp
je 0x43bfbc
mov cx, word [0x4fa306]
lea eax, [esp + eax*2 + 0x68]
cmp cx, 0xa
jb 0x43bf6c
movzx ecx, cx
push ecx
movzx ecx, word [0x4fa304]
push ecx
movzx ecx, word [0x4fa302]
push ecx
movzx ecx, word [0x4fa300]
push ecx
push str._V_u._u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
jmp 0x43bf93
movzx ecx, word [0x4fa304]
push ecx
movzx ecx, word [0x4fa302]
push ecx
movzx ecx, word [0x4fa300]
push ecx
push str._V_u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
cmp dword [0x4f9f74], ebp
je 0x43bfab
push str.___Win32_
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x68]
push eax
push dword [0x4fa548]
call dword [sym.imp.USER32.dll_SetWindowTextW]
call dword [sym.imp.USER32.dll_CreateMenu]
mov esi, dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [0x4fc9d0], eax
call esi
mov dword [0x4fc9d4], eax
call esi
mov dword [0x4fc9d8], eax
call esi
mov dword [0x4fc9dc], eax
call esi
mov dword [0x4fc9e0], eax
call esi
mov dword [0x4fc9e4], eax
call esi
mov dword [0x4fc9e8], eax
call esi
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
mov edi, str.Pop
push edi
push dword [0x4fc9d4]
mov dword [0x4fc9ec], eax
push 0x10
pop ebx
push ebx
push dword [0x4fc9d0]
call esi
push edi
push dword [0x4fc9e4]
push ebx
push dword [0x4fc9d0]
call esi
push edi
push dword [0x4fc9e8]
push ebx
push dword [0x4fc9d0]
call esi
push edi
push dword [0x4fc9ec]
push ebx
push dword [0x4fc9d0]
call esi
push str.DevId
push 0xa4d8
push ebp
push dword [0x4fc9dc]
call esi
push str.Safely_Remove
push 0xa488
push ebp
push dword [0x4fc9d4]
call esi
push str.Restart_Device
push 0xa489
push ebp
push dword [0x4fc9d4]
call esi
mov ebx, 0x4510c0
push ebx
push ebp
mov edi, 0x800
push edi
push dword [0x4fc9d4]
call esi
push str.Restart_Port
push 0xa48a
push ebp
push dword [0x4fc9d4]
call esi
push ebx
push ebp
push edi
push dword [0x4fc9d4]
call esi
push str.Copy_Tree_from_here
push dword [0x4fc9d8]
push 0x10
push dword [0x4fc9d4]
call esi
push 0x46bde0
push 0xa474
push ebp
push dword [0x4fc9d8]
call esi
push 0x46bdd0
push 0xa475
push ebp
push dword [0x4fc9d8]
call esi
push str.Copy_Report_from_here
push 0xa476
push ebp
push dword [0x4fc9d4]
call esi
push str.Copy...
push dword [0x4fc9dc]
push 0x10
push dword [0x4fc9d4]
call esi
push ebx
push ebp
push edi
push dword [0x4fc9d4]
call esi
push str.Regedit...
push dword [0x4fc9e0]
push 0x10
push dword [0x4fc9d4]
call esi
push ebx
push ebp
push edi
push dword [0x4fc9d4]
call esi
push str.Device_Properties
push 0xa492
push ebp
push dword [0x4fc9d4]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fc9e4]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fc9e4]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fc9e4]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fc9e8]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x4fc9e8]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fc9e8]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fc9e8]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x4fc9ec]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x4fc9ec]
call esi
push ebx
push 0xb602
push edi
push dword [0x4fc9ec]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x4fc9ec]
call esi
push 0x6b
push dword [0x4fa544]
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x4fa5bc], eax
jmp 0x43c284
cmp esi, 0xffffffff
je 0x43c284
lea eax, [esp + 0x34]
push eax
push dword [0x4fa5bc]
push dword [0x4fa548]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x43c284
lea eax, [esp + 0x34]
push eax
push dword [0x4fa548]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x43c284
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 0x43c239
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.004452a3
add esp, 0x14
push ebp
push ebp
call fcn.0042cffd
call fcn.00443146
mov esi, 0x4fa4d4
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 0x4fa4ec
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 0x43c3a1
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 0x43c39a
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.00427772
push eax
push str.timerunning_s
push edi
call fcn.004452a3
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
call fcn.00427772
push eax
push str.timekernel__s
push edi
call fcn.004452a3
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call fcn.00427772
push eax
push str.timeuser____s
push edi
call fcn.004452a3
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004479a0
call fcn.00424712
call fcn.00445772
call fcn.00446851
mov eax, dword [0x4fc9c8]
cmp eax, ebp
je 0x43c3c5
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.0042cdff
cmp word [0x4fa638], bp
jne 0x43c3dc
cmp word [0x4fa840], bp
je 0x43c3ea
cmp dword [0x4fac50], ebp
jne 0x43c3ea
mov dword [0x4fac54], edi
mov eax, dword [0x4fac54]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x558
ret 0x10