Function at 0x40a190
Capabilities:
Accept command line arguments
Check mutex and terminate process on windows
Check mutex on windows
Delete file
Print debug messages
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b51b
mov eax, dword fs:[0]
push eax
mov eax, 0x34f3c
call fcn.0040f260
mov eax, dword [0x4424f8]
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
push str.__2DFASDF11___FILEMAPING_NAME_KaoPuzushou
push 1
xor ebx, ebx
push ebx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x33748], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40a624
call sub.mfc100u.dll_AfxInitRichEdit2
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push ebx
call sub.mfc100u.dll_AfxEnableControlContainer
add esp, 4
push ebx
call fcn.0040eddf
lea eax, [ebp - 0x34f38]
push eax
call fcn.00420420
add esp, 4
push eax
mov ecx, 0x47642c
mov dword [ebp - 4], ebx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x34f38]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
push ebx
lea ecx, [esi + 0x3374c]
push ecx
lea edx, [esi + 0x3375c]
push edx
call sub.gdiplus.dll_GdiplusStartup
push str.__2DFASDF11___FILEMAPING_NAME_KaoPuzushou
lea ecx, [esi + 0x33740]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov ecx, esi
mov dword [esi + 0x33770], ebx
call fcn.00409840
push str.kpzs.exe
call fcn.00402a10
mov edi, eax
add esp, 4
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.00402970
add esp, 8
cmp edi, dword [ebp - 0x224]
jne 0x40a2a2
mov dword [esi + 0x33760], 1
jmp 0x40a2a8
mov dword [esi + 0x33760], ebx
push ebx
lea ecx, [ebp - 0x34f34]
call fcn.0040de50
lea ecx, [ebp - 0x34f34]
push ecx
mov ecx, esi
mov dword [ebp - 4], 1
call fcn.00408c90
call fcn.00408f00
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x34f3c]
call dword [0x42f908]
lea ecx, [ebp - 0x34f3c]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc100u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp edi, ebx
je 0x40a314
push 0x42fad8
push str.__RunForCheckUpdating__
lea ecx, [ebp - 0x34f3c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Replace]
mov dword [ebp - 0x34f38], 1
cmp dword [esi + 0x3376c], ebx
je 0x40a37d
lea edx, [ebp - 0x34f38]
push edx
call fcn.00420420
push str.updateRestart.tag
lea eax, [ebp - 0x34f38]
push eax
lea ecx, [ebp - 0x34f48]
push ecx
mov byte [ebp - 4], 3
call fcn.00401010
add esp, 0x10
mov ecx, eax
call dword [sym.imp.mfc100u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x34f48]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x34f38]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
jmp 0x40a606
mov ecx, esi
call fcn.00408c50
test eax, eax
jne 0x40a426
mov dword [ebp - 0x34f38], ebx
cmp dword [esi + 0x33760], ebx
jne 0x40a3ad
push 0x430f60
push ebx
push 0x430f3c
call fcn.00402c70
add esp, 0xc
push 2
call dword [sym.imp.USER32.dll_PostQuitMessage]
lea ecx, [esi + 0xb8]
call fcn.00422440
cmp dword [eax], 3
je 0x40a5f0
lea ecx, [esi + 0xb8]
call fcn.00422440
cmp dword [eax], ebx
je 0x40a5f0
lea ecx, [ebp - 0x34f34]
call fcn.0040e190
mov eax, dword [ebp - 0x33a08]
mov ecx, dword [ebp - 0x33a0c]
sub eax, ecx
sar eax, 4
xor edi, edi
cmp eax, ebx
jbe 0x40a40e
add ecx, 0xc
mov edx, eax
cmp dword [ecx], ebx
je 0x40a408
inc edi
add ecx, 0x10
dec edx
jne 0x40a403
cmp eax, edi
jne 0x40a5f0
push 8
call dword [sym.imp.USER32.dll_PostQuitMessage]
push 8
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov edx, dword [esi + 0x33728]
cmp dword [edx], ebx
jne 0x40a440
push 1
call dword [sym.imp.USER32.dll_PostQuitMessage]
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push ecx
lea eax, [ebp - 0x34f3c]
mov ecx, esp
mov dword [ebp - 0x34f40], esp
push eax
call dword [0x42f918]
mov ecx, esi
call fcn.00409fb0
mov ecx, esi
cmp eax, ebx
jne 0x40a4cc
call fcn.00409080
cmp eax, 1
jne 0x40a4fb
mov ecx, esi
call fcn.004092a0
cmp eax, 1
jne 0x40a4a2
mov dword [ebp - 0x34f38], ebx
cmp dword [esi + 0x33760], ebx
jne 0x40a4f3
push 0x430f60
push ebx
push 0x430f28
call fcn.00402c70
add esp, 0xc
push 2
jmp 0x40a4f5
cmp eax, 2
jne 0x40a4fb
mov dword [ebp - 0x34f38], ebx
cmp dword [esi + 0x33760], ebx
jne 0x40a4f3
push 0x430f60
push ebx
push str._vzeR
call fcn.00402c70
add esp, 0xc
push 5
jmp 0x40a4f5
call fcn.00409720
mov ecx, dword [esi + 0x3372c]
push str.upgradeCheckup
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Compare]
test eax, eax
jne 0x40a4fb
mov ecx, dword [esi + 0x33744]
push ecx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x64
call dword [sym.imp.USER32.dll_PostQuitMessage]
lea ecx, [esi + 0xb8]
call fcn.00408ac0
cmp eax, 2
jne 0x40a534
cmp dword [esi + 0x33760], ebx
jne 0x40a52c
push 0x430f60
push ebx
push 0x430f04
mov dword [ebp - 0x34f38], ebx
call fcn.00402c70
add esp, 0xc
push 2
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov edx, dword [esi + 0xb8]
mov eax, dword [edx + 0x18]
lea ecx, [esi + 0xb8]
call eax
test eax, eax
jne 0x40a3b5
mov ecx, dword [esi + 0x33730]
sub ecx, dword [esi + 0x3372c]
test ecx, 0xfffffffc
jne 0x40a584
cmp dword [esi + 0x33760], ebx
jne 0x40a584
cmp dword [esi + 0x33768], ebx
jne 0x40a58c
push 0x430f60
push ebx
push 0x430ee4
call fcn.00402c70
add esp, 0xc
cmp dword [esi + 0x33768], ebx
je 0x40a5e0
cmp dword [esi + 0x33764], ebx
jne 0x40a5e0
lea edx, [ebp - 0x34f40]
push edx
call fcn.00420420
push str.updaterUpdated.tag
push eax
lea eax, [ebp - 0x34f44]
push eax
mov byte [ebp - 4], 4
call fcn.00401010
add esp, 0x10
mov ecx, eax
call dword [sym.imp.mfc100u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x34f44]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x34f40]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
push 1
call dword [sym.imp.USER32.dll_PostQuitMessage]
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [ebp - 0x34f34]
mov dword [esi + 0x20], ecx
cmp dword [ebp - 0x34f38], ebx
je 0x40a606
call sub.mfc100u.dll_CDialog::DoModal
lea ecx, [ebp - 0x34f3c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x34f34]
mov dword [ebp - 4], 0xffffffff
call fcn.00409dc0
xor eax, eax
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.0040f12c
mov esp, ebp
pop ebp
ret