Function at 0x404e00
Capabilities:
Access peb ldr_data
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x412c83
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9bc
push ebx
mov ebx, ecx
push ebp
push esi
lea esi, [ebx + 0x84c]
push edi
mov ecx, esi
mov eax, dword [ecx]
and eax, 0xff
mov edx, dword [ecx + 4]
mov dword [esp + 0x30], edx
mov edx, dword [ecx + 8]
mov dword [esp + 0x34], edx
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x3b]
and edx, 0xff
push edx
push eax
push str.CExtractManager::DecryptDoc:_msPackedSecuAclszDocEncKey:___02X___02X_
push 0x418244
call fcn.00401710
mov ecx, dword [esi]
mov edx, dword [esi + 4]
lea eax, [ebx + 0x1188]
add esp, 0x10
mov dword [eax], ecx
mov ecx, dword [esi + 8]
mov dword [eax + 4], edx
mov edx, dword [esi + 0xc]
mov dword [eax + 8], ecx
lea ecx, [esp + 0x10]
mov dword [eax + 0xc], edx
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov dword [esp + 0x9d4], 0
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x9d4], 1
call sub.MFC42.DLL_CString::CString_1
lea eax, [ebx + 0x11a8]
lea ecx, [esp + 0x10]
push eax
mov byte [esp + 0x9d8], 2
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
push 0x2e
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReverseFind
push eax
push 0
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Delete
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
push str.CExtractManager::DecryptDoc:_File___s__Ext___s_
push 0x418244
call fcn.00401710
mov ecx, dword [esp + 0x20]
mov edi, dword [sym.imp.MSVCRT.dll__access]
push 0
push ecx
call edi
add esp, 0x18
cmp eax, 0xffffffff
je 0x4050a7
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_1
push 0x2e
lea ecx, [esp + 0x14]
mov byte [esp + 0x9d8], 3
mov esi, 1
call sub.MFC42.DLL_CString::ReverseFind
lea edx, [esp + 0x1c]
push eax
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x9d8], 4
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9d4], 3
call sub.MFC42.DLL_CString::CString
push esi
lea eax, [esp + 0x1c]
push str.__d_
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x18]
lea edx, [esp + 0x20]
lea eax, [esp + 0x24]
push ecx
push edx
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push eax
push edx
mov byte [esp + 0x9e0], 5
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x9d8], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9d4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x9d4], 3
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x10]
push 0
push eax
call edi
add esp, 8
cmp eax, 0xffffffff
je 0x405096
push esi
lea ecx, [esp + 0x1c]
push str.__d_
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea edx, [esp + 0x18]
lea eax, [esp + 0x20]
lea ecx, [esp + 0x28]
push edx
push eax
push ecx
call sub.MFC42.DLL_operator_1
lea edx, [esp + 0x14]
mov byte [esp + 0x9d4], 7
push edx
push eax
lea eax, [esp + 0x2c]
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x9d8], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x9d4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0x9d4], 3
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x10]
push ecx
push str.CExtractManager::DecryptDoc:_Serch___s_
push 0x418244
call fcn.00401710
mov edx, dword [esp + 0x1c]
push 0
push edx
inc esi
call edi
add esp, 0x14
cmp eax, 0xffffffff
jne 0x404ff9
lea ecx, [esp + 0x20]
mov byte [esp + 0x9d4], 2
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x10]
push 0x418464
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x1c], edi
je 0x40514b
mov ecx, dword [esp + 0x10]
push edi
push ecx
push str.CExtractManager::DecryptDoc:_Open___s__Fp___p_
push 0x418244
call fcn.00401710
mov ecx, dword [esp + 0x9ec]
mov edx, dword [ebx + 0x848]
mov esi, dword [esp + 0x9f0]
push 0
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
lea ebp, [eax + eax*2]
shl ebp, 2
mov eax, dword [edx + ebp + 0x100]
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push 0
lea eax, [ebx + 0x1188]
push 6
push eax
push 2
lea ecx, [esp + 0x6c]
push 4
push ecx
call fcn.00408da0
add esp, 0x34
test eax, eax
je 0x405188
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
push 0xffffffffffffffeb
push str.CExtractManager::DecryptDoc:_RijndaelInit__Fail___d
push 0x418244
call fcn.00401710
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x9d4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x9d4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x9d4], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x40531f
mov edx, dword [ebx + 0x848]
mov eax, dword [edx + ebp + 0x104]
lea edx, [edx + ebp + 0x104]
test eax, eax
je 0x4052cb
jmp 0x4051ad
mov esi, dword [esp + 0x9e0]
mov ecx, 0x108
xor eax, eax
lea edi, [esp + 0x18c]
push esi
rep stosd dword es:[edi], eax
mov ecx, 0x108
lea edi, [esp + 0x5b0]
rep stosd dword es:[edi], eax
mov eax, dword [edx]
cmp eax, 0x400
jbe 0x405238
push 0x400
lea eax, [esp + 0x194]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, eax
add esp, 0x10
cmp esi, 0x400
jne 0x405293
lea ecx, [esp + 0x5ac]
lea edx, [esp + 0x18c]
push ecx
push 0x2000
lea eax, [esp + 0x48]
push edx
push eax
call fcn.00409210
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x5bc]
shr eax, 3
push ecx
push eax
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x20
jmp 0x405293
push eax
lea eax, [esp + 0x194]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
lea ecx, [esp + 0x5bc]
mov esi, eax
push ecx
lea edx, [esp + 0x1a0]
push esi
lea eax, [esp + 0x58]
push edx
push eax
call fcn.00409560
mov ecx, dword [esp + 0x3c]
mov edi, eax
push ecx
push edi
lea edx, [esp + 0x5d4]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
push eax
push edi
push esi
push str.CExtractManager::DecryptDoc:_padDecrypt__len__d___d__Write__d_
push 0x418244
call fcn.00401710
add esp, 0x44
mov eax, dword [ebx + 0x848]
mov ecx, dword [eax + ebp + 0x104]
lea eax, [eax + ebp + 0x104]
sub ecx, esi
mov dword [eax], ecx
mov ecx, dword [ebx + 0x848]
mov eax, dword [ecx + ebp + 0x104]
lea edx, [ecx + ebp + 0x104]
test eax, eax
jne 0x4051a6
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
push str.CExtractManager::DecryptDoc:_End....._
push 0x418244
call fcn.00401710
add esp, 0xc
lea ecx, [esp + 0x18]
mov byte [esp + 0x9d4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x9d4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x9d4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x9cc]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x9c8
ret 8