Function at 0x404eff
Capabilities:
Check if file exists
Read file on windows
Write file on windows

Disassembly:
push ebp
sub esp, 0x840
lea ebp, [esp - 4]
mov eax, dword [0x46aff0]
xor eax, ebp
mov dword [ebp + 0x840], eax
push 0x28
mov eax, 0x44ab32
call fcn.00434843
mov eax, dword [ebp + 0x850]
mov ebx, ecx
mov dword [ebp - 0x30], eax
movzx eax, byte [ebx + 0x27f]
push eax
movzx eax, byte [ebx + 0x270]
push eax
push str.CExtractManager::DecryptDoc:_msPackedSecuAclszDocEncKey:___02X___02X_
mov edi, 0x44e95c
push edi
mov esi, 0x46e460
push esi
mov dword [ebp - 0x24], ebx
call fcn.00401ae2
add esp, 0x14
call fcn.00418faa
push eax
lea ecx, [ebp - 0x10]
call fcn.0040290c
and dword [ebp - 4], 0
call fcn.00418faa
push eax
lea ecx, [ebp - 0x18]
call fcn.0040290c
mov byte [ebp - 4], 1
call fcn.00418faa
push eax
lea ecx, [ebp - 0x28]
call fcn.0040290c
push dword [ebp + 0x84c]
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00404201
push eax
lea ecx, [ebp - 0x10]
call fcn.004031d2
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.00403185
push 0x2e
lea ecx, [ebp - 0x18]
call fcn.004037de
push eax
push 0
lea ecx, [ebp - 0x18]
call fcn.00403ba4
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push str.CExtractManager::DecryptDoc:_File___s__Ext___s_
push edi
push esi
call fcn.00401ae2
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x14
push dword [ebp - 0x10]
call ebx
cmp eax, 1
jne 0x405127
call fcn.00418faa
push eax
lea ecx, [ebp - 0x14]
call fcn.0040290c
push 0x2e
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
mov dword [ebp - 0x1c], 1
call fcn.004037de
push eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x10]
call fcn.00403107
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00403185
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004026da
push 1
lea eax, [ebp - 0x28]
push str.__d_
push eax
call fcn.00404aaf
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00404b5c
lea ecx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 5
call fcn.00404b5c
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.00403185
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004026da
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004026da
jmp 0x40510e
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push str.__d_
push eax
call fcn.00404aaf
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00404b5c
lea ecx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 7
call fcn.00404b5c
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.00403185
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.004026da
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004026da
push dword [ebp - 0x10]
push str.CExtractManager::DecryptDoc:_Serch___s_
push edi
push esi
call fcn.00401ae2
add esp, 0x10
inc dword [ebp - 0x1c]
push dword [ebp - 0x10]
call ebx
cmp eax, 1
je 0x40509b
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov byte [ebp - 4], 2
call fcn.004026da
mov ebx, dword [ebp - 0x10]
push 0x44ea68
push ebx
call fcn.00435593
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x405183
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004026da
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004026da
lea ecx, [ebx - 0x10]
call fcn.004026da
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x840]
xor ecx, ebp
call fcn.00434834
add ebp, 0x844
leave
ret 8
push eax
push ebx
push str.CExtractManager::DecryptDoc:_Open___s__Fp___p_
push edi
push esi
call fcn.00401ae2
mov ebx, dword [ebp - 0x24]
add esp, 0x14
push 0
push dword [ebp + 0x84c]
lea ecx, [ebx + 0x258]
call fcn.004034f8
push dword [eax + 0x200]
push dword [ebp - 0x30]
call fcn.00437599
push dword [ebx + 0x1454]
call fcn.00411d40
mov ebx, eax
add esp, 0x10
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x24]
mov edx, dword [ebx]
push 0x20
add eax, 0x270
push eax
mov ecx, ebx
mov byte [ebp - 4], 9
call dword [edx]
test eax, eax
jne 0x405351
push dword [ebp - 0x14]
call fcn.00435451
push 0xffffffffffffffeb
push str.CExtractManager::DecryptDoc:_RijndaelInit__Fail___d
push edi
push esi
call fcn.00401ae2
push ebx
call fcn.004165fd
mov ecx, dword [ebp - 0x28]
add esp, 0x18
add ecx, 0xfffffff0
call fcn.004026da
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004026da
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
jmp 0x405157
push 0x420
lea eax, [ebp]
push 0
push eax
call fcn.00434950
push 0x420
lea eax, [ebp + 0x420]
push 0
push eax
call fcn.00434950
mov ecx, dword [ebp - 0x24]
add esp, 0x18
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.004034f8
push dword [ebp - 0x30]
mov ecx, eax
mov eax, 0x400
cmp dword [ecx + 0x204], eax
jb 0x4052c1
push eax
lea eax, [ebp]
push 1
push eax
call fcn.004378be
mov dword [ebp - 0x1c], eax
mov eax, 0x400
add esp, 0x10
cmp dword [ebp - 0x1c], eax
jne 0x40532d
mov edx, dword [ebx]
push eax
lea eax, [ebp + 0x420]
push eax
lea eax, [ebp]
push eax
mov ecx, ebx
call dword [edx + 8]
push dword [ebp - 0x14]
push eax
lea eax, [ebp + 0x420]
push 1
push eax
call fcn.00437a3d
add esp, 0x10
mov dword [ebp - 0x20], eax
jmp 0x40532d
mov ecx, dword [ebp - 0x24]
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.004034f8
push dword [eax + 0x204]
lea eax, [ebp]
push 1
push eax
call fcn.004378be
mov edx, dword [ebx]
add esp, 0x10
push eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp + 0x420]
push eax
lea eax, [ebp]
push eax
mov ecx, ebx
call dword [edx + 0xc]
push dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp + 0x420]
push 1
push eax
call fcn.00437a3d
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x1c]
push str.CExtractManager::DecryptDoc:_padDecrypt__len__d___d__Write__d_
push edi
push esi
call fcn.00401ae2
add esp, 0x28
cmp dword [ebp - 0x20], 0
je 0x4053a1
mov ecx, dword [ebp - 0x24]
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.004034f8
mov ecx, dword [ebp - 0x1c]
add eax, 0x204
sub dword [eax], ecx
mov ecx, dword [ebp - 0x24]
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.004034f8
cmp dword [eax + 0x204], 0
jne 0x405228
push dword [ebp - 0x14]
call fcn.00435451
mov dword [esp], str.CExtractManager::DecryptDoc:_End....._
push edi
push esi
call fcn.00401ae2
mov ecx, dword [ebp - 0x24]
add esp, 0xc
push dword [ebp - 0x10]
add ecx, 0x1974
call fcn.004022cd
xor esi, esi
inc esi
jmp 0x4053ac
push dword [ebp - 0x14]
call fcn.00435451
pop ecx
xor esi, esi
push ebx
call fcn.004165fd
pop ecx
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004026da
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004026da
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.004026da
mov eax, esi
jmp 0x40515e