Function at 0x40137c
Capabilities:
Copy file
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440ae4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1a0
push esi
push edi
mov dword [ebp - 0x188], ecx
push str.893_FAILED_OLD_DPSAVE_DURING_EXIT
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString_2
mov dword [ebp - 4], 0
xor eax, eax
cmp dword [ebp + 8], 2
setne al
push eax
mov ecx, dword [ebp - 0x188]
call fcn.0040bc91
push 0x3e8
mov ecx, dword [ebp - 0x188]
call fcn.0040b705
cmp dword [ebp + 8], 2
jne 0x4013fc
mov ecx, dword [ebp - 0x188]
call fcn.0040a762
push 0x7d0
mov ecx, dword [ebp - 0x188]
call fcn.0040b705
cmp dword [ebp + 8], 2
jne 0x40142e
push 0
mov ecx, dword [ebp - 0x188]
call fcn.0040cf85
and eax, 0xff
test eax, eax
jne 0x40142e
push 0
lea ecx, [ebp - 0x1c]
call fcn.00402550
push eax
mov ecx, dword [ebp - 0x188]
call fcn.0040c713
mov ecx, dword [ebp - 0x188]
mov byte [ecx + 0x100], 1
push 0x453138
push 0x453144
push str.CloseWithoutQuestion
push 0x453160
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov edx, dword [ebp + 8]
push edx
push str.891_NEW_INIT_COMMAND_RECEIVED_REINIT_CODE__ld
lea eax, [ebp - 0x1c]
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push 0
lea ecx, [ebp - 0x1c]
call fcn.00402550
push eax
mov ecx, dword [ebp - 0x188]
call fcn.0040c713
cmp dword [ebp + 0xc], 2
jne 0x401559
cmp dword [ebp + 8], 2
je 0x401559
mov ecx, 9
mov esi, str.c:_fidiawsAdvancedSplashWindow.exe
lea edi, [ebp - 0xc8]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push 0
call fcn.00402560
mov ecx, eax
call sub.MFC42.DLL_CWnd::ShowWindow
push 0x44
push 0
lea ecx, [ebp - 0xa0]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0xa0], 0x44
mov dword [ebp - 0x74], 1
mov word [ebp - 0x70], 5
lea edx, [ebp - 0x5c]
push edx
lea eax, [ebp - 0xa0]
push eax
push 0
push 0
push 8
push 0
push 0
push 0
lea ecx, [ebp - 0xc8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0xcc], eax
cmp dword [ebp - 0xcc], 0
jne 0x401559
push 0
push 0
lea edx, [ebp - 0xd0]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0
mov eax, dword [ebp - 0xd0]
push eax
mov ecx, dword [ebp - 0x188]
call fcn.0040c713
mov ecx, dword [ebp - 0xd0]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [ebp - 0x4c]
call fcn.00424d8e
mov byte [ebp - 4], 1
mov word [ebp - 0x24], 4
push 0xa
push 0
push 0
push 4
lea edx, [ebp - 0x4c]
push edx
mov ecx, dword [ebp - 0x188]
call fcn.00401223
mov eax, dword [ebp - 0x188]
cmp dword [eax + 0x130], 0
je 0x4015fe
mov ecx, dword [ebp - 0x188]
mov ecx, dword [ecx + 0x130]
call fcn.0041cdfe
mov edx, dword [ebp - 0x188]
mov eax, dword [edx + 0x130]
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x164]
mov dword [ebp - 0x160], ecx
cmp dword [ebp - 0x160], 0
je 0x4015e4
push 1
mov edx, dword [ebp - 0x160]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x160]
call dword [eax + 4]
mov dword [ebp - 0x18c], eax
jmp 0x4015ee
mov dword [ebp - 0x18c], 0
mov ecx, dword [ebp - 0x188]
mov dword [ecx + 0x130], 0
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x14], 2
mov dword [ebp - 0x10], 1
mov edx, dword [ebp + 8]
mov eax, dword [ebp + edx*4 - 0x18]
push eax
mov ecx, dword [ebp - 0x188]
call fcn.0040ba18
push 0x7d0
mov ecx, dword [ebp - 0x188]
call fcn.0040b705
mov ecx, dword [ebp - 0x188]
call fcn.0040a886
mov ecx, dword [ebp - 0x188]
mov dword [ecx + 0x420], 0
mov edx, dword [ebp - 0x188]
mov dword [edx + 0x134], 0
mov eax, dword [ebp - 0x188]
mov dword [eax + 0x464], 1
mov ecx, dword [ebp - 0x188]
add ecx, 0x4a4
call sub.MFC42.DLL_CStringList::RemoveAll
mov ecx, dword [ebp - 0x188]
call fcn.0040ed1e
mov ecx, dword [ebp - 0x188]
cmp dword [ecx + 0x138], 0
je 0x40189d
cmp dword [ebp + 8], 0
jne 0x40189d
push 0
push 0x45af90
lea ecx, [ebp - 0xdc]
call sub.MFC42.DLL_CSingleLock::CSingleLock
mov byte [ebp - 4], 2
push 0xbb8
lea ecx, [ebp - 0xdc]
call sub.MFC42.DLL_CSingleLock::Lock
test eax, eax
je 0x401880
push 0
push 0x4531bc
mov edx, dword [ebp - 0x188]
add edx, 0x454
push edx
lea eax, [ebp - 0x16c]
push eax
call sub.MFC42.DLL_operator_3
mov dword [ebp - 0x190], eax
mov ecx, dword [ebp - 0x190]
mov dword [ebp - 0x194], ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x194]
call fcn.00402550
push eax
push 0x4531cc
mov edx, dword [ebp - 0x188]
add edx, 0x454
push edx
lea eax, [ebp - 0x170]
push eax
call sub.MFC42.DLL_operator_3
mov dword [ebp - 0x198], eax
mov ecx, dword [ebp - 0x198]
mov dword [ebp - 0x19c], ecx
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x19c]
call fcn.00402550
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x168], al
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x170]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x16c]
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x168]
and edx, 0xff
test edx, edx
je 0x4017a7
push 0
push 0
push 0x4531dc
call sub.MFC42.DLL_AfxMessageBox
push 0
push 0x453200
mov eax, dword [ebp - 0x188]
add eax, 0x454
push eax
lea ecx, [ebp - 0x178]
push ecx
call sub.MFC42.DLL_operator_3
mov dword [ebp - 0x1a0], eax
mov edx, dword [ebp - 0x1a0]
mov dword [ebp - 0x1a4], edx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x1a4]
call fcn.00402550
push eax
push 0x453210
mov eax, dword [ebp - 0x188]
add eax, 0x454
push eax
lea ecx, [ebp - 0x17c]
push ecx
call sub.MFC42.DLL_operator_3
mov dword [ebp - 0x1a8], eax
mov edx, dword [ebp - 0x1a8]
mov dword [ebp - 0x1ac], edx
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x1ac]
call fcn.00402550
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x174], al
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x17c]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x178]
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x174]
and eax, 0xff
test eax, eax
je 0x401873
push 0
push 0
push 0x453220
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [ebp - 0xdc]
call sub.MFC42.DLL_CSingleLock::Unlock
jmp 0x40188e
push 0
push 0
push str.Failed_overwrite_C1DATA.BIN_e_C1DP.BIN
call sub.MFC42.DLL_AfxMessageBox
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xdc]
call fcn.00402830
push 0x7d0
mov ecx, dword [ebp - 0x188]
call fcn.0040b705
mov ecx, dword [ebp - 0x188]
mov dword [ecx + 0xf8], 1
mov dword [ebp - 0x110], 0xa
push 0
push 0x453268
call fcn.004025a0
mov dword [ebp - 0xfc], eax
cmp dword [ebp - 0xfc], 0
je 0x40192f
cmp dword [ebp - 0x110], 0
jle 0x40192f
push 0
push str.941_SENDING_TO_FAPICTRL_A_QUIT_MESSAGE
mov ecx, dword [ebp - 0x188]
call fcn.0040c713
push 0
push 0
push 0x12
mov ecx, dword [ebp - 0xfc]
call fcn.00402490
push 0x3e8
mov ecx, dword [ebp - 0x188]
call fcn.0040b705
mov edx, dword [ebp - 0x110]
sub edx, 1
mov dword [ebp - 0x110], edx
jmp 0x4018c7
cmp dword [ebp + 8], 2
jne 0x401945
push 0x1388
mov ecx, dword [ebp - 0x188]
call fcn.0040b705
cmp dword [ebp + 8], 2
je 0x401951
cmp dword [ebp + 0xc], 2
jne 0x40197e
mov byte [ebp - 0x180], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.004025c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x180]
jmp 0x401a53
mov ecx, 6
mov esi, str.c:_fidiawsFapiCtrl.exe
lea edi, [ebp - 0xf8]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push 0x44
push 0
lea eax, [ebp - 0x154]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x154], 0x44
lea ecx, [ebp - 0x10c]
push ecx
lea edx, [ebp - 0x154]
push edx
push 0
push 0
push 8
push 0
push 0
push 0
lea eax, [ebp - 0xf8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0x158], eax
cmp dword [ebp - 0x158], 0
jne 0x401a2b
push 0
push 0
lea ecx, [ebp - 0x15c]
push ecx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0
mov edx, dword [ebp - 0x15c]
push edx
mov ecx, dword [ebp - 0x188]
call fcn.0040c713
mov eax, dword [ebp - 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 0x184], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.004025c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x184]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8