Function at 0x402140
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x404842
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x270
push ebx
push ebp
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x288], 1
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp + 0x290]
push 0x4075bc
lea ecx, [esp + 0x1c]
mov ebx, 2
push eax
push ecx
mov byte [esp + 0x294], bl
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea edx, [esp + 0x50]
push edx
push eax
call dword [sym.imp.MSVCRT.dll__findfirst]
mov esi, eax
add esp, 8
lea ecx, [esp + 0x18]
mov dword [esp + 0x24], esi
call fcn.0040424e
cmp esi, 0xffffffff
je 0x4023c1
mov ebp, dword [sym.imp.USER32.dll_PeekMessageA]
mov eax, dword [esp + 0x60]
test eax, eax
je 0x4023a0
cmp byte [esp + 0x64], 0x2e
je 0x4023a0
test byte [esp + 0x50], 0x10
jne 0x4023a0
push 1
push 0
push 0
lea eax, [esp + 0x40]
push 0
push eax
call ebp
test eax, eax
je 0x402225
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
push 1
push 0
push 0
lea eax, [esp + 0x40]
push 0
push eax
call ebp
test eax, eax
jne 0x4021fc
mov eax, dword [edi + 0x138]
test eax, eax
jne 0x40241d
lea ecx, [esp + 0x64]
lea edx, [esp + 0x294]
push ecx
lea eax, [esp + 0x2c]
push edx
push eax
call sub.MFC42.DLL_operator
mov esi, dword [eax]
lea ecx, [esp + 0x64]
lea edx, [esp + 0x290]
push ecx
lea eax, [esp + 0x1c]
push edx
push eax
mov byte [esp + 0x294], 3
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
lea ecx, [esp + 0x18]
sete byte [esp + 0x13]
call fcn.0040424e
lea ecx, [esp + 0x28]
mov byte [esp + 0x288], bl
call fcn.0040424e
mov al, byte [esp + 0x13]
test al, al
jne 0x40245d
lea ecx, [esp + 0x64]
lea edx, [esp + 0x294]
push ecx
lea eax, [esp + 0x30]
push edx
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea ecx, [esp + 0x168]
push ecx
push eax
mov byte [esp + 0x290], 4
call sub.MFC42.DLL_CFile::GetStatus
lea ecx, [esp + 0x2c]
mov byte [esp + 0x288], bl
call fcn.0040424e
lea edx, [esp + 0x64]
lea eax, [esp + 0x294]
push edx
lea ecx, [esp + 0x20]
push eax
push ecx
mov byte [esp + 0x184], 0x20
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea edx, [esp + 0x168]
push edx
push eax
mov byte [esp + 0x290], 5
call sub.MFC42.DLL_CFile::SetStatus
lea ecx, [esp + 0x1c]
mov byte [esp + 0x288], bl
call fcn.0040424e
lea eax, [esp + 0x64]
lea ecx, [esp + 0x294]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x28c], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x30]
mov byte [esp + 0x288], bl
call fcn.0040424e
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push 0x4075b4
push ecx
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
lea ecx, [edi + 0x90]
push eax
mov byte [esp + 0x28c], 7
call sub.MFC42.DLL_CWnd::SetWindowTextA
lea ecx, [esp + 0x20]
mov byte [esp + 0x288], bl
call fcn.0040424e
mov esi, dword [esp + 0x24]
lea edx, [esp + 0x50]
push edx
push esi
call dword [sym.imp.MSVCRT.dll__findnext]
add esp, 8
test eax, eax
je 0x4021c7
push esi
call dword [sym.imp.MSVCRT.dll__findclose]
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x288], 1
call fcn.0040424e
lea ecx, [esp + 0x290]
mov byte [esp + 0x288], 0
call fcn.0040424e
lea ecx, [esp + 0x294]
mov dword [esp + 0x288], 0xffffffff
call fcn.0040424e
mov eax, 1
mov ecx, dword [esp + 0x280]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x27c
ret 8
lea ecx, [esp + 0x14]
mov byte [esp + 0x288], 1
call fcn.0040424e
lea ecx, [esp + 0x290]
mov byte [esp + 0x288], 0
call fcn.0040424e
lea ecx, [esp + 0x294]
mov dword [esp + 0x288], 0xffffffff
call fcn.0040424e
mov eax, ebx
jmp 0x402402
lea ecx, [esp + 0x14]
mov byte [esp + 0x288], 1
call fcn.0040424e
lea ecx, [esp + 0x290]
mov byte [esp + 0x288], 0
call fcn.0040424e
lea ecx, [esp + 0x294]
mov dword [esp + 0x288], 0xffffffff
call fcn.0040424e
xor eax, eax
jmp 0x402402