Function at 0x401040
Capabilities:
Accept command line arguments
Enumerate files on windows
Get common file path
Hide graphical window

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x401eb7
push eax
mov dword fs:[0], esp
sub esp, 0x56c
push ebx
push ebp
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call sub.MFC42.DLL_AfxWinInit
test eax, eax
jne 0x4010a1
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push str.Fatal_Error:_MFC_initialization_failed
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
add esp, 0xc
mov eax, 1
jmp 0x401983
push 0
push 0
call dword [sym.imp.USER32.dll_ShowWindow]
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov dword [esp + 0x584], 0
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x478]
push 0x104
push ecx
mov byte [esp + 0x58c], 1
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edx, [esp + 0x478]
lea ecx, [esp + 0x20]
push edx
call sub.MFC42.DLL_CString::operator
push str.Prefile
lea ecx, [esp + 0x24]
call fcn.00401bea
call dword [sym.imp.MSVCRT.dll___p___argv]
mov eax, dword [eax]
or ecx, 0xffffffff
lea edx, [esp + 0x378]
push 0x5c
mov edi, dword [eax]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x37c]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
lea edx, [esp + 0x378]
lea ecx, [esp + 0x14]
mov byte [eax], 0
push edx
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimRight
push str.Prefile
lea ecx, [esp + 0x18]
call fcn.00401bea
mov eax, dword [esp + 0x14]
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov esi, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
push eax
push str.SourDir
push ecx
call esi
add esp, 8
push eax
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [esp + 0x2c]
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
add esp, 0xc
push edx
push str.DestDir
push eax
call esi
add esp, 8
push eax
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
add esp, 0xc
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push ecx
mov bl, 2
push str._s.pf
push edx
mov byte [esp + 0x590], bl
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x38]
add esp, 0xc
lea eax, [esp + 0x238]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x401453
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x138]
lea edx, [esp + 0x20]
rep stosd dword es:[edi], eax
push 0x403038
lea eax, [esp + 0x2c]
push edx
push eax
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x24]
push ecx
push eax
push edx
mov byte [esp + 0x590], 3
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x13c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
push 0x403038
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
lea edx, [esp + 0x28]
push ecx
push edx
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x28]
push ecx
push eax
push edx
mov byte [esp + 0x590], 4
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x3c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0x13c]
mov ecx, esp
mov dword [esp + 0x14], esp
push edx
call fcn.00401bcc
push ecx
lea eax, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
mov byte [esp + 0x590], 5
call fcn.00401bcc
mov byte [esp + 0x58c], bl
call fcn.004019a0
mov edx, dword [esp + 0x24]
add esp, 8
lea ecx, [esp + 0x238]
push ecx
push edx
call ebp
test eax, eax
je 0x401448
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x138]
push 0x403038
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
lea ecx, [esp + 0x28]
push eax
push ecx
call sub.MFC42.DLL_operator
lea edx, [esp + 0x264]
mov byte [esp + 0x584], 6
push edx
push eax
lea eax, [esp + 0x30]
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea ecx, [esp + 0x138]
push eax
push ecx
call esi
add esp, 8
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
push 0x403038
lea eax, [esp + 0x14]
push edx
push eax
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x18]
push ecx
push eax
push edx
mov byte [esp + 0x590], 7
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x3c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0x13c]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.00401bcc
push ecx
lea eax, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x3c], esp
push eax
mov byte [esp + 0x590], 8
call fcn.00401bcc
mov byte [esp + 0x58c], bl
call fcn.004019a0
mov edx, dword [esp + 0x24]
add esp, 8
lea ecx, [esp + 0x238]
push ecx
push edx
call ebp
test eax, eax
jne 0x40132b
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push ecx
push str._s.dat
push edx
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x38]
add esp, 0xc
lea eax, [esp + 0x238]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x4016cf
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x138]
lea edx, [esp + 0x20]
rep stosd dword es:[edi], eax
push 0x403038
lea eax, [esp + 0x1c]
push edx
push eax
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x10]
push ecx
push eax
push edx
mov byte [esp + 0x590], 9
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x13c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
push 0x403038
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
push edx
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x10]
push ecx
push eax
push edx
mov byte [esp + 0x590], 0xa
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x3c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0x13c]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call fcn.00401bcc
push ecx
lea eax, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
mov byte [esp + 0x590], 0xb
call fcn.00401bcc
mov byte [esp + 0x58c], bl
call fcn.004019a0
mov edx, dword [esp + 0x24]
add esp, 8
lea ecx, [esp + 0x238]
push ecx
push edx
call ebp
test eax, eax
je 0x4016c4
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x138]
push 0x403038
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
lea ecx, [esp + 0x1c]
push eax
push ecx
call sub.MFC42.DLL_operator
lea edx, [esp + 0x264]
mov byte [esp + 0x584], 0xc
push edx
push eax
lea eax, [esp + 0x18]
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea ecx, [esp + 0x138]
push eax
push ecx
call esi
add esp, 8
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
push 0x403038
lea eax, [esp + 0x28]
push edx
push eax
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x28]
push ecx
push eax
push edx
mov byte [esp + 0x590], 0xd
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x3c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0x13c]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call fcn.00401bcc
push ecx
lea eax, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
mov byte [esp + 0x590], 0xe
call fcn.00401bcc
mov byte [esp + 0x58c], bl
call fcn.004019a0
mov edx, dword [esp + 0x24]
add esp, 8
lea ecx, [esp + 0x238]
push ecx
push edx
call ebp
test eax, eax
jne 0x4015a7
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push ecx
push str._s.bin
push edx
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x38]
add esp, 0xc
lea eax, [esp + 0x238]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x40194b
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x138]
lea edx, [esp + 0x20]
rep stosd dword es:[edi], eax
push 0x403038
lea eax, [esp + 0x1c]
push edx
push eax
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x10]
push ecx
push eax
push edx
mov byte [esp + 0x590], 0xf
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x13c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
push 0x403038
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
push edx
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x10]
push ecx
push eax
push edx
mov byte [esp + 0x590], 0x10
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x3c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0x13c]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call fcn.00401bcc
push ecx
lea eax, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
mov byte [esp + 0x590], 0x11
call fcn.00401bcc
mov byte [esp + 0x58c], bl
call fcn.004019a0
mov edx, dword [esp + 0x24]
add esp, 8
lea ecx, [esp + 0x238]
push ecx
push edx
call ebp
test eax, eax
je 0x401940
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x138]
push 0x403038
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
lea ecx, [esp + 0x1c]
push eax
push ecx
call sub.MFC42.DLL_operator
lea edx, [esp + 0x264]
mov byte [esp + 0x584], 0x12
push edx
push eax
lea eax, [esp + 0x18]
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea ecx, [esp + 0x138]
push eax
push ecx
call esi
add esp, 8
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x38]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
push 0x403038
lea eax, [esp + 0x28]
push edx
push eax
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x264]
lea edx, [esp + 0x28]
push ecx
push eax
push edx
mov byte [esp + 0x590], 0x13
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
lea eax, [esp + 0x3c]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x584], bl
call sub.MFC42.DLL_CString::CString
push ecx
lea edx, [esp + 0x13c]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call fcn.00401bcc
push ecx
lea eax, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
mov byte [esp + 0x590], 0x14
call fcn.00401bcc
mov byte [esp + 0x58c], bl
call fcn.004019a0
mov edx, dword [esp + 0x24]
add esp, 8
lea ecx, [esp + 0x238]
push ecx
push edx
call ebp
test eax, eax
jne 0x401823
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x584], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x584], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov dword [esp + 0x584], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x57c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x578
ret