Function at 0x404edf
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, 0x44a985
call fcn.00434673
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.00418dbf
push eax
lea ecx, [ebp - 0x10]
call fcn.00402901
and dword [ebp - 4], 0
call fcn.00418dbf
push eax
lea ecx, [ebp - 0x18]
call fcn.00402901
mov byte [ebp - 4], 1
call fcn.00418dbf
push eax
lea ecx, [ebp - 0x28]
call fcn.00402901
push dword [ebp + 0x84c]
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.004041c1
push eax
lea ecx, [ebp - 0x10]
call fcn.0040319a
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040314d
push 0x2e
lea ecx, [ebp - 0x18]
call fcn.0040379e
push eax
push 0
lea ecx, [ebp - 0x18]
call fcn.00403b64
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 0x405107
call fcn.00418dbf
push eax
lea ecx, [ebp - 0x14]
call fcn.00402901
push 0x2e
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
mov dword [ebp - 0x1c], 1
call fcn.0040379e
push eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x10]
call fcn.004030cf
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.0040314d
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.00404a8f
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00404b3c
lea ecx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 5
call fcn.00404b3c
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.0040314d
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 0x4050ee
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push str.__d_
push eax
call fcn.00404a8f
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00404b3c
lea ecx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 7
call fcn.00404b3c
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.0040314d
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 0x40507b
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.004353c3
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x405163
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.00434664
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.004034b8
push dword [eax + 0x200]
push dword [ebp - 0x30]
call fcn.004373c9
push dword [ebx + 0x1454]
call fcn.00411b40
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 0x405331
push dword [ebp - 0x14]
call fcn.00435281
push 0xffffffffffffffeb
push str.CExtractManager::DecryptDoc:_RijndaelInit__Fail___d
push edi
push esi
call fcn.00401ae2
push ebx
call fcn.004163fd
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 0x405137
push 0x420
lea eax, [ebp]
push 0
push eax
call fcn.00434780
push 0x420
lea eax, [ebp + 0x420]
push 0
push eax
call fcn.00434780
mov ecx, dword [ebp - 0x24]
add esp, 0x18
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.004034b8
push dword [ebp - 0x30]
mov ecx, eax
mov eax, 0x400
cmp dword [ecx + 0x204], eax
jb 0x4052a1
push eax
lea eax, [ebp]
push 1
push eax
call fcn.004376ee
mov dword [ebp - 0x1c], eax
mov eax, 0x400
add esp, 0x10
cmp dword [ebp - 0x1c], eax
jne 0x40530d
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.0043786d
add esp, 0x10
mov dword [ebp - 0x20], eax
jmp 0x40530d
mov ecx, dword [ebp - 0x24]
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.004034b8
push dword [eax + 0x204]
lea eax, [ebp]
push 1
push eax
call fcn.004376ee
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.0043786d
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 0x405381
mov ecx, dword [ebp - 0x24]
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.004034b8
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.004034b8
cmp dword [eax + 0x204], 0
jne 0x405208
push dword [ebp - 0x14]
call fcn.00435281
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 0x40538c
push dword [ebp - 0x14]
call fcn.00435281
pop ecx
xor esi, esi
push ebx
call fcn.004163fd
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 0x40513e