Function at 0x4437ae
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 [0x50a0dc], eax
mov eax, dword [esp + 0x55c]
push str.psapi.dll
mov dword [0x50a138], eax
call fcn.00428c70
mov dword [0x50c810], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x50a00c], eax
call fcn.004277d2
test eax, eax
je 0x4437fa
mov dword [0x50a130], 1
jmp 0x4437ff
call fcn.004277b5
push ebx
push ebp
push esi
push edi
call fcn.00431801
push 0x509b18
call fcn.0042df87
call fcn.0042df65
call fcn.0042b128
call fcn.0044aadc
push 0x40
push 0x509c40
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
push 0x40
push 0x509728
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, 0x509520
push esi
call fcn.0042bfc7
push 0x509cc8
push esi
call fcn.0042985a
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
mov edi, 0x5097a8
push edi
call ebx
push str..ini
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
call fcn.0042c8f1
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push dword [0x50a0f4]
mov esi, 0x456480
push str.ShowDebug
push esi
call ebp
push edi
push 0xffffffffffffffff
push str.DpiAwareness
push esi
mov dword [0x50a0e4], eax
call ebp
push 4
mov dword [0x4a1ac0], eax
pop ebp
cmp eax, 0xffffffff
jne 0x4438bb
push edi
push ebp
push str.DpiAwareness
push esi
mov dword [0x4a1ac0], ebp
call fcn.004298db
push dword [0x4a1ac0]
call fcn.0042cb51
cmp dword [0x4a1ac0], ebp
jl 0x4438e2
call fcn.0042eb56
mov dword [0x4a1ac4], eax
call fcn.0042ebab
mov dword [0x4a1ab8], eax
push str.Riched32.dll
call fcn.00428c70
xor ebp, ebp
mov dword [0x50a134], eax
cmp eax, ebp
jne 0x443901
mov eax, 0xfe
jmp 0x4443a5
call fcn.0044f29b
push 0x50a0ac
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x50a0c4
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x509ed0
push 0x509520
call fcn.00427f30
push 0x40
push 0x5094a0
push str._COMPUTERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x40
push 0x509420
push str._USERNAME_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.00428cbe
mov dword [0x50a128], eax
call fcn.00428cee
push edi
push 1
push str.CrashDump
push esi
mov dword [0x50a12c], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x44398d
push 0x4479bb
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00427927
xor eax, eax
inc eax
cmp dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
jle 0x443b66
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 0x443c28
movzx eax, word [esi]
cmp ax, 0x2d
je 0x4439e2
cmp ax, 0x2f
jne 0x443c28
movzx eax, word [esi + 4]
cmp ax, bp
je 0x443a0b
cmp ax, 0x3a
je 0x443a0b
movzx ecx, word [esi + 6]
cmp cx, 0x3a
je 0x443a0b
cmp ax, 0x3d
je 0x443a0b
cmp cx, 0x3d
jne 0x443c28
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x5a
je 0x443c06
cmp eax, 0x52
jne 0x443a44
lea eax, [esi + 6]
push eax
push 0x50a478
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x50a0ec], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x58
jne 0x443a74
lea eax, [esi + 6]
push eax
push 0x50a680
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x50a0ec], 1
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4f
jne 0x443a9a
lea eax, [esi + 6]
push eax
push 0x50a888
mov dword [esp + 0x20], 1
call ebx
mov dword [esp + 0x578], ebp
movzx eax, word [esi + 2]
and eax, 0xffffffdf
cmp eax, 0x4c
jne 0x443afa
cmp dword [0x509b30], 0x500
jbe 0x443af5
movzx eax, word [esi + 4]
cmp ax, 0x30
jb 0x443ad6
cmp ax, 0x39
ja 0x443ad6
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
mov dword [0x5168ac], eax
lea eax, [esi + 8]
jmp 0x443ae3
mov dword [0x5168ac], 3
lea eax, [esi + 6]
push eax
push 0x5168b0
call ebx
mov dword [0x516ab8], 1
xor eax, eax
inc eax
jmp 0x443afe
mov eax, dword [esp + 0x18]
movzx ecx, word [esi + 2]
and ecx, 0xffffffdf
cmp ecx, 0x46
jne 0x443b12
xor eax, eax
inc eax
mov dword [0x516ac0], eax
movzx ecx, word [esi + 2]
and ecx, 0xffffffdf
cmp ecx, 0x53
jne 0x443b47
movzx eax, word [esi + 4]
cmp ax, 0x3a
je 0x443b2e
cmp ax, 0x3d
jne 0x443b44
lea eax, [esi + 6]
push eax
push 0x50a270
call ebx
push 0x50a270
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
xor eax, eax
inc eax
cmp eax, ebp
je 0x443c28
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x20]
jl 0x4439b0
mov esi, 0x456480
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x443ba3
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x443ba3
push str.stdout
push 0x50a478
call ebx
mov dword [esp + 0x578], ebp
mov dword [0x50a0ec], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp dword [0x50a0ec], ebp
jne 0x443c86
push edi
push ebp
push str.OneInstance
push esi
call ebx
push eax
push 0x9dc1
mov dword [0x50c7e4], eax
call fcn.0043275a
cmp dword [0x50c7e4], ebp
je 0x443c86
push 0x509520
push str..xml
push dword [0x4a1ab0]
push str.32770
call fcn.0042b6fb
cmp eax, ebp
je 0x443c86
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x443c7e
add esi, 6
push esi
mov dword [0x5168ac], ebp
mov dword [0x516ab8], ebp
mov dword [0x516abc], ebp
call fcn.0042ecbe
xor eax, eax
jmp 0x4443a5
xor eax, eax
cmp word [esi + 2], 0x3f
sete al
mov esi, eax
mov eax, 0x453999
cmp esi, ebp
jne 0x443c42
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 0x456428
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 0x4443a5
call fcn.0044d68f
cmp dword [0x516ab8], ebp
je 0x443d40
push str._Win32_
push 0x509edc
push str.________UsbTreeView_V_s__S________
push 1
call fcn.0044d31e
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push dword [0x509b28]
push dword [0x509b2c]
push 0x509b50
push dword [0x509b24]
push dword [0x509b20]
push dword [0x509b1c]
push dword [0x509b18]
push str.OS_version_u._u._u__SP_u___s_suite_X_type_i_acp_u
push 1
call fcn.0044d31e
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.0044d31e
add esp, 0xc
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x443d40
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.0044d31e
add esp, 0x10
call fcn.0044fbf6
push 0x194
call fcn.00447831
pop ecx
cmp eax, ebp
je 0x443d62
mov ecx, eax
call fcn.0040de3c
mov dword [0x50c784], eax
jmp 0x443d68
mov dword [0x50c784], ebp
push 0x4014
call fcn.00447831
pop ecx
cmp eax, ebp
je 0x443d8b
push dword [0x50c784]
mov ecx, eax
call fcn.00407d74
mov dword [0x50c788], eax
jmp 0x443d91
mov dword [0x50c788], ebp
push 0x4028
call fcn.00447831
pop ecx
cmp eax, ebp
je 0x443db4
push dword [0x50c784]
mov ecx, eax
call fcn.004012df
mov dword [0x50c78c], eax
jmp 0x443dba
mov dword [0x50c78c], ebp
push 0x24
call fcn.00447831
pop ecx
cmp eax, ebp
je 0x443dd4
mov ecx, eax
call fcn.00444d46
mov dword [0x50c790], eax
jmp 0x443dda
mov dword [0x50c790], ebp
push 0x30
call fcn.00447831
pop ecx
cmp eax, ebp
je 0x443df4
mov ecx, eax
call fcn.00447367
mov dword [0x50c794], eax
jmp 0x443dfa
mov dword [0x50c794], ebp
push 0x1ac
call fcn.00447831
pop ecx
cmp eax, ebp
je 0x443e17
mov ecx, eax
call fcn.004457fb
mov dword [0x50c798], eax
jmp 0x443e1d
mov dword [0x50c798], ebp
push 0x6a
push dword [0x50a138]
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebp
mov dword [0x50a188], eax
call fcn.0040ec62
push edi
call fcn.00448741
push eax
push str.DarkMode
push esi
call ebx
push edi
push 1
push str.DarkScrl
push esi
mov dword [0x50a120], eax
call ebx
mov dword [0x50a124], eax
cmp dword [0x50a120], ebp
je 0x443e6c
mov dword [0x50a120], 1
push dword [esp + 0x578]
call fcn.00443377
test eax, eax
jne 0x443e84
push 2
pop eax
jmp 0x4443a5
push edi
push 1
push str.ShowVerInCaption
push esi
call ebx
test eax, eax
je 0x443f57
xor eax, eax
push 0x7e
mov word [esp + 0x6c], ax
lea eax, [esp + 0x6e]
push ebp
push eax
call fcn.004476fd
add esp, 0xc
push 0x3f
lea eax, [esp + 0x6c]
push eax
push dword [0x50a13c]
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp eax, ebp
je 0x443f57
mov cx, word [0x509ed6]
lea eax, [esp + eax*2 + 0x68]
cmp cx, 0xa
jb 0x443f07
movzx ecx, cx
push ecx
movzx ecx, word [0x509ed4]
push ecx
movzx ecx, word [0x509ed2]
push ecx
movzx ecx, word [0x509ed0]
push ecx
push str._V_u._u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
jmp 0x443f2e
movzx ecx, word [0x509ed4]
push ecx
movzx ecx, word [0x509ed2]
push ecx
movzx ecx, word [0x509ed0]
push ecx
push str._V_u._u._u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
cmp dword [0x509b3c], ebp
je 0x443f46
push str.___Win32_
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x68]
push eax
push dword [0x50a13c]
call dword [sym.imp.USER32.dll_SetWindowTextW]
call dword [sym.imp.USER32.dll_CreateMenu]
mov esi, dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [0x50c818], eax
call esi
mov dword [0x50c81c], eax
call esi
mov dword [0x50c820], eax
call esi
mov dword [0x50c824], eax
call esi
mov dword [0x50c828], eax
call esi
mov dword [0x50c82c], eax
call esi
mov dword [0x50c830], eax
call esi
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
mov edi, str.Pop
push edi
push dword [0x50c81c]
mov dword [0x50c834], eax
push 0x10
pop ebx
push ebx
push dword [0x50c818]
call esi
push edi
push dword [0x50c82c]
push ebx
push dword [0x50c818]
call esi
push edi
push dword [0x50c830]
push ebx
push dword [0x50c818]
call esi
push edi
push dword [0x50c834]
push ebx
push dword [0x50c818]
call esi
push str.DevId
push 0xa4d8
push ebp
push dword [0x50c824]
call esi
push str.Safely_Remove
push 0xa488
push ebp
push dword [0x50c81c]
call esi
push str.Restart_Device
push 0xa489
push ebp
push dword [0x50c81c]
call esi
mov ebx, 0x4536f0
push ebx
push ebp
mov edi, 0x800
push edi
push dword [0x50c81c]
call esi
push str.Restart_Port
push 0xa48a
push ebp
push dword [0x50c81c]
call esi
push ebx
push ebp
push edi
push dword [0x50c81c]
call esi
push str.Copy_Tree_from_here
push dword [0x50c820]
push 0x10
push dword [0x50c81c]
call esi
push 0x478a10
push 0xa474
push ebp
push dword [0x50c820]
call esi
push 0x478a00
push 0xa475
push ebp
push dword [0x50c820]
call esi
push str.Copy_Report_from_here
push 0xa476
push ebp
push dword [0x50c81c]
call esi
push str.Copy...
push dword [0x50c824]
push 0x10
push dword [0x50c81c]
call esi
push ebx
push ebp
push edi
push dword [0x50c81c]
call esi
push str.Regedit...
push dword [0x50c828]
push 0x10
push dword [0x50c81c]
call esi
push ebx
push ebp
push edi
push dword [0x50c81c]
call esi
push str.Device_Properties
push 0xa492
push ebp
push dword [0x50c81c]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x50c82c]
call esi
push ebx
push 0xb602
push edi
push dword [0x50c82c]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x50c82c]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x50c830]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x50c830]
call esi
push ebx
push 0xb602
push edi
push dword [0x50c830]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x50c830]
call esi
push str.Copy
push 0xb600
push ebp
push dword [0x50c834]
call esi
push str.Paste
push 0xb601
push ebp
push dword [0x50c834]
call esi
push ebx
push 0xb602
push edi
push dword [0x50c834]
call esi
push str.Select_All
push 0xb603
push ebp
push dword [0x50c834]
call esi
push 0x6b
push dword [0x50a138]
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x50a1cc], eax
jmp 0x44421f
cmp esi, 0xffffffff
je 0x44422f
lea eax, [esp + 0x34]
push eax
push dword [0x50a1cc]
push dword [0x50a13c]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x44421f
lea eax, [esp + 0x34]
push eax
push dword [0x50a13c]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x44421f
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 0x4441d4
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.0044d31e
add esp, 0x14
push ebp
push ebp
call fcn.00431bea
mov eax, dword [0x4bf8e0]
cmp eax, ebp
je 0x444263
push eax
call fcn.0044786c
pop ecx
call fcn.0044ab2b
mov esi, 0x50a0ac
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 0x50a0c4
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 0x44434c
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 0x444345
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.0042b293
push eax
push str.timerunning_s
push edi
call fcn.0044d31e
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
call fcn.0042b293
push eax
push str.timekernel__s
push edi
call fcn.0044d31e
add esp, 0xc
lea eax, [esp + 0x24]
push eax
call fcn.0042b293
push eax
push str.timeuser____s
push edi
call fcn.0044d31e
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0044fb33
push 0x4a1ae0
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyClassImageList]
call fcn.00427730
call fcn.0044d7e9
call fcn.0044e8ae
mov eax, dword [0x50c810]
cmp eax, ebp
je 0x44437b
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.0043185c
cmp word [0x50a478], bp
jne 0x444392
cmp word [0x50a680], bp
je 0x4443a0
cmp dword [0x50a26c], ebp
jne 0x4443a0
mov dword [0x50aa90], edi
mov eax, dword [0x50aa90]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x558
ret 0x10