Function at 0x402df0
Capabilities:
Accept command line arguments
Check if file exists
Get session information
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40eda2
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x419014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x38], edi
call dword [sym.imp.mfc140u.dll_CDialog::OnInitDialog]
push dword [edi + 0xd0]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
push 0x80
push dword [edi + 0x20]
call esi
push dword [edi + 0xd0]
push 0
push 0x80
push dword [edi + 0x20]
call esi
push 0x4110dc
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__7]
mov esi, eax
test esi, esi
je 0x402eb4
cmp dword [ebp - 0x18], 1
jle 0x402eb4
push dword [esi + 4]
lea eax, [edi + 0x4dc]
push 0x410e3c
push eax
call ebx
push dword [esi + 8]
lea eax, [edi + 0x4d8]
push 0x410e3c
push eax
call ebx
add esp, 0x18
push dword [edi + 0x4dc]
push str._1___s_r_n
push 1
call fcn.00407340
push dword [edi + 0x4d8]
push str._2___s_r_n
push 1
call fcn.00407340
add esp, 0x18
lea ecx, [edi + 0x4dc]
push str.tester
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
test eax, eax
je 0x402f20
call dword [sym.imp.mfc140u.dll_AfxGetModuleState]
mov eax, dword [eax + 0x10]
push eax
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402f20
push 0x12
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x4031b9
lea eax, [ebp - 0x30]
xorps xmm0, xmm0
push eax
push dword [edi + 0x20]
movups xmmword [ebp - 0x30], xmm0
call dword [sym.imp.USER32.dll_GetClientRect]
mov esi, dword [ebp - 0x28]
sub esi, dword [ebp - 0x30]
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call edi
movd xmm0, esi
mov esi, dword [ebp - 0x24]
sub esi, dword [ebp - 0x2c]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
push 1
cvtdq2ps xmm0, xmm0
mulss xmm1, dword [0x4157c4]
mulss xmm0, dword [0x4157c4]
subss xmm1, xmm0
cvttss2si ebx, xmm1
call edi
push 1
push 0
push 0
movd xmm1, eax
movd xmm0, esi
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm0, xmm0
mulss xmm1, dword [0x4157c4]
mulss xmm0, dword [0x4157c4]
subss xmm1, xmm0
cvttss2si eax, xmm1
push eax
push ebx
mov ebx, dword [ebp - 0x38]
mov ecx, ebx
push 0
call dword [sym.imp.mfc140u.dll_CWnd::SetWindowPos]
push 0
push 0x80
push 0x40000
mov ecx, ebx
call dword [sym.imp.mfc140u.dll_CWnd::ModifyStyleEx]
push 2
mov ecx, ebx
call dword [sym.imp.mfc140u.dll_CWnd::ShowWindow]
push 4
push 0
push 0x18
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_PostMessageW]
push 0x4110dc
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
push str.C:ProgramData_scEscpp
lea edi, [ebx + 0x278]
mov byte [ebp - 4], 1
push 0x104
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
mov esi, dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__7]
lea eax, [ebp - 0x14]
push str.scEscppPrintConfig.ini
push edi
push str._s_s
push eax
call esi
add esp, 0x1c
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40307a
push str.C:Program_FilesManufacturerEndpoint_Agent_scEscpp
push 0x410e3c
push 0x104
push edi
call fcn.00406ef0
push str.scEscppPrintConfig.ini
push edi
lea eax, [ebp - 0x14]
push str._s_s
push eax
call esi
add esp, 0x20
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40307a
push str.C:Program_Files__x86_ManufacturerEndpoint_Agent_scEscpp
push 0x410e3c
push 0x104
push edi
call fcn.00406ef0
add esp, 0x10
mov ecx, ebx
call fcn.00403320
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push 5
push 0xffffffffffffffff
push 0
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
push dword [ebp - 0x34]
lea esi, [ebx + 0x4c4]
mov ecx, esi
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator]
push dword [ebp - 0x34]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
push 0x4110dc
mov ecx, esi
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
test eax, eax
jne 0x4030d4
push esi
call fcn.00406820
push dword [esi]
movzx eax, byte [ebx + 0x480]
push str.Main___window_account___s__r_n
push eax
call fcn.00407340
mov edi, dword [sym.imp.mfc140u.dll_AfxBeginThread]
add esp, 0xc
mov dword [ebx + 0x268], 1
push 0
push 0
push 0
push 0
push ebx
push 0x4041a0
call edi
mov dword [ebx + 0x26c], eax
test eax, eax
movzx eax, byte [ebx + 0x480]
jne 0x403123
push str.Main___ERROR:_Failed_to_begin_thread_r_n
jmp 0x403128
push str.Main___Log_trans_Thread_Started..._r_n
push eax
call fcn.00407340
add esp, 8
lea ecx, [ebx + 0x4cc]
push 0x4119ac
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
test eax, eax
je 0x40315b
push 0x4119b0
lea ecx, [ebx + 0x4cc]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
test eax, eax
jne 0x4031b0
movzx eax, byte [ebx + 0x480]
push str.Main___PowerPack_V1_mode._so_enable_sso_thread._r_n
push eax
call fcn.00407340
add esp, 8
mov dword [ebx + 0x270], 1
push 0
push 0
push 0
push 0
push ebx
push 0x4039d0
call edi
mov dword [ebx + 0x274], eax
test eax, eax
movzx eax, byte [ebx + 0x480]
jne 0x4031a2
push str.Main___ERROR:_Failed_to_begin_Policy_Sync._r_n
jmp 0x4031a7
push str.Main___PolicySync_Thread_Started..._r_n
push eax
call fcn.00407340
add esp, 8
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret