Function at 0x402790
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x447989
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x654
mov eax, dword [0x4985c0]
push ebx
push ebp
push esi
push edi
mov edi, ecx
push str.Start_TextFile_Decrypt
push edi
mov dword [esp + 0x668], eax
call fcn.004019c0
add esp, 8
lea eax, [edi + 0xe8]
push eax
lea ecx, [esp + 0x24]
call fcn.00402700
mov eax, dword [esp + 0x24]
mov esi, dword [eax]
mov ebx, dword [esp + 0x28]
xor ebp, ebp
cmp esi, eax
mov dword [esp + 0x66c], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], eax
je 0x402a42
mov bl, 5
lea ecx, [esi + 0xc]
push ecx
lea ecx, [esp + 0x60]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esi, 0x28
push esi
lea ecx, [esp + 0x98]
mov byte [esp + 0x670], 1
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x450c14
lea eax, [edi + 0x110]
push eax
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0x678], 2
call fcn.00401080
lea ecx, [esp + 0x68]
push ecx
push eax
lea edx, [esp + 0x8c]
push edx
mov byte [esp + 0x684], 3
call fcn.00401000
add esp, 0x18
lea ecx, [esp + 0x40]
mov byte [esp + 0x66c], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x1000
lea ecx, [esp + 0xb4]
call fcn.00406300
push 1
lea ecx, [esp + 0x98]
mov byte [esp + 0x670], 6
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea ecx, [esp + 0xb8]
call fcn.00406520
test eax, eax
jne 0x4028cf
lea ecx, [esp + 0x5c]
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push str.Failed_Open_Input_File:__s
push edi
call fcn.004019c0
add esp, 0xc
jmp 0x4029db
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_1]
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_1]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0xb4]
mov byte [esp + 0x670], 8
call fcn.004063a0
test eax, eax
je 0x402933
push 0x450b18
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator_2]
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call dword [0x4502d8]
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0xb4]
call fcn.004063a0
test eax, eax
jne 0x402900
lea ecx, [esp + 0xb0]
call fcn.00406370
lea ecx, [esp + 0x30]
call sub.MFC71.DLL_CFile::CFile
push 0
push 0x1001
lea ecx, [esp + 0x80]
mov byte [esp + 0x674], 9
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea ecx, [esp + 0x3c]
call sub.MFC71.DLL_CFile::Open
test eax, eax
jne 0x40298d
lea ecx, [esp + 0x78]
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push str.Failed_Open_Output_File:__s
push edi
call fcn.004019c0
add esp, 0xc
jmp 0x4029b6
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::GetLength]
push eax
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::GetString]
push eax
lea ecx, [esp + 0x38]
call sub.MFC71.DLL_CFile::Write
lea ecx, [esp + 0x30]
call sub.MFC71.DLL_CFile::Close
inc ebp
lea ecx, [esp + 0x30]
mov byte [esp + 0x66c], 8
call fcn.00427920
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0xb0]
mov byte [esp + 0x66c], bl
call fcn.00406480
lea ecx, [esp + 0x78]
mov byte [esp + 0x66c], 2
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x94]
mov byte [esp + 0x66c], 1
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x5c]
mov byte [esp + 0x66c], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x18]
call fcn.00401e00
mov esi, dword [esp + 0x18]
cmp esi, dword [esp + 0x2c]
jne 0x402804
mov ebx, dword [esp + 0x1c]
push ebp
push str._d_Files_Finished
push edi
call fcn.004019c0
add esp, 0xc
cmp ebp, ebx
je 0x402a66
sub ebx, ebp
push ebx
push str._d_Files_Failed
push edi
call fcn.004019c0
add esp, 0xc
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
push eax
push ecx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x678], 0xffffffff
call fcn.00402610
mov ecx, dword [esp + 0x24]
push ecx
call sub.MFC71.DLL_operator_delete
mov ecx, dword [esp + 0x668]
add esp, 4
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x654]
pop ebx
call fcn.00427a7e
add esp, 0x660
ret