Function at 0x406240
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14c
push esi
push edi
push str.E_SDA10x
push str.E_SDA10x.LOG
call fcn.00405990
mov esi, dword [esp + 0x168]
push esi
push str._Enter__:_WinMain__lpszCmdLine_:
call fcn.00403b40
push 0x421990
xor edi, edi
push esi
mov dword [esp + 0x20], edi
call fcn.0040a300
add esp, 0x18
test eax, eax
jne 0x4063d3
push 0x42198c
push esi
call fcn.0040a300
add esp, 8
test eax, eax
jne 0x4063d3
push str.EPSON_STM3_Agent_Module2
push str.E_SDA102.EXE
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x4062d8
push str.Found_Other_Agent_Process
call fcn.00403ad0
push str._Leave__:_WinMain
call fcn.00403ad0
add esp, 8
call fcn.00401210
pop edi
xor eax, eax
pop esi
add esp, 0x14c
ret 0x10
push str.Regist_Agent_process_to_Startup
call fcn.00403ad0
mov esi, dword [esp + 0x15c]
push 1
push esi
call fcn.00405a50
add esp, 0xc
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x10], 0x2000
mov dword [esp + 0x14], 0x406040
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], str.E_SDA102.EXE
call dword [sym.imp.USER32.dll_RegisterClassA]
push edi
push esi
push edi
push edi
push 0x80000000
push 0x80000000
push 0x80000000
push 0x80000000
push 0xcf0000
push str.EPSON_STM3_Agent_Module2
push str.E_SDA102.EXE
push edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
push edi
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push edi
push edi
push edi
lea ecx, [esp + 0x40]
push ecx
call esi
test eax, eax
je 0x4063b2
push ebx
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
push ebp
mov ebp, dword [sym.imp.USER32.dll_DispatchMessageA]
lea edx, [esp + 0x3c]
push edx
call ebx
lea eax, [esp + 0x3c]
push eax
call ebp
push edi
push edi
push edi
lea ecx, [esp + 0x48]
push ecx
call esi
test eax, eax
jne 0x406394
pop ebp
pop ebx
push str._Leave__:_WinMain
call fcn.00403ad0
add esp, 4
call fcn.00401210
mov eax, dword [esp + 0x3c]
pop edi
pop esi
add esp, 0x14c
ret 0x10
push str.Enter_Remove_Mode
call fcn.00403ad0
push str.Delete_Startup_Registration.
call fcn.00403ad0
mov edx, dword [esp + 0x160]
push edi
push edx
call fcn.00405a50
add esp, 0x10
push str.EPSON_STM3_Agent_Module2
push str.E_SDA102.EXE
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x406496
push str.Found_other_Agent_process
call fcn.00403ad0
lea eax, [esp + 0x54]
push eax
call fcn.00405b70
push str.Open_Local_Mailslot.
call fcn.00403ad0
add esp, 0xc
push edi
push 0x80
push 3
push edi
push 1
push 0x40000000
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x406496
push str.Write_Local_Mailslot.
mov dword [esp + 0xc], edi
call fcn.00403ad0
add esp, 4
push edi
lea edx, [esp + 0xc]
push edx
push str.TERMINATE
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push str.TERMINATE
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push str.Close_Local_Mailslot.
call fcn.00403ad0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str._Leave__:_WinMain
call fcn.00403ad0
add esp, 4
call fcn.00401210
pop edi
mov eax, 1
pop esi
add esp, 0x14c
ret 0x10