Function at 0x40496b
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 [0x467fd0]
xor eax, ebp
mov dword [ebp + 0x840], eax
push 0x28
mov eax, 0x448c3c
call fcn.004329a3
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, 0x44c95c
push edi
mov esi, 0x46afb0
push esi
mov dword [ebp - 0x24], ebx
call fcn.00401ac3
add esp, 0x14
call fcn.0041711c
push eax
lea ecx, [ebp - 0x10]
call fcn.00402902
and dword [ebp - 4], 0
call fcn.0041711c
push eax
lea ecx, [ebp - 0x18]
call fcn.00402902
mov byte [ebp - 4], 1
call fcn.0041711c
push eax
lea ecx, [ebp - 0x28]
call fcn.00402902
push dword [ebp + 0x84c]
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00403d53
push eax
lea ecx, [ebp - 0x10]
call fcn.004031c8
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040317b
push 0x2e
lea ecx, [ebp - 0x18]
call fcn.00403632
push eax
push 0
lea ecx, [ebp - 0x18]
call fcn.0040384b
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push str.CExtractManager::DecryptDoc:_File___s__Ext___s_
push edi
push esi
call fcn.00401ac3
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x14
push dword [ebp - 0x10]
call ebx
cmp eax, 1
jne 0x404b93
call fcn.0041711c
push eax
lea ecx, [ebp - 0x14]
call fcn.00402902
push 0x2e
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
mov dword [ebp - 0x1c], 1
call fcn.00403632
push eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x10]
call fcn.004030fd
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.0040317b
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004026b1
push 1
lea eax, [ebp - 0x28]
push str.__d_
push eax
call fcn.004045bd
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040466a
lea ecx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 5
call fcn.0040466a
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.0040317b
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004026b1
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004026b1
jmp 0x404b7a
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push str.__d_
push eax
call fcn.004045bd
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040466a
lea ecx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 7
call fcn.0040466a
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.0040317b
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.004026b1
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004026b1
push dword [ebp - 0x10]
push str.CExtractManager::DecryptDoc:_Serch___s_
push edi
push esi
call fcn.00401ac3
add esp, 0x10
inc dword [ebp - 0x1c]
push dword [ebp - 0x10]
call ebx
cmp eax, 1
je 0x404b07
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov byte [ebp - 4], 2
call fcn.004026b1
mov ebx, dword [ebp - 0x10]
push 0x44ca68
push ebx
call fcn.004336f3
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x404bef
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004026b1
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004026b1
lea ecx, [ebx - 0x10]
call fcn.004026b1
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.00432994
add ebp, 0x844
leave
ret 8
push eax
push ebx
push str.CExtractManager::DecryptDoc:_Open___s__Fp___p_
push edi
push esi
call fcn.00401ac3
mov ebx, dword [ebp - 0x24]
add esp, 0x14
push 0
push dword [ebp + 0x84c]
lea ecx, [ebx + 0x258]
call fcn.0040345f
push dword [eax + 0x200]
push dword [ebp - 0x30]
call fcn.004356f9
push dword [ebx + 0x1454]
call fcn.0040fd90
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 0x404dbd
push dword [ebp - 0x14]
call fcn.004335b1
push 0xffffffffffffffeb
push str.CExtractManager::DecryptDoc:_RijndaelInit__Fail___d
push edi
push esi
call fcn.00401ac3
push ebx
call fcn.0041474d
mov ecx, dword [ebp - 0x28]
add esp, 0x18
add ecx, 0xfffffff0
call fcn.004026b1
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004026b1
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
jmp 0x404bc3
push 0x420
lea eax, [ebp]
push 0
push eax
call fcn.00432ab0
push 0x420
lea eax, [ebp + 0x420]
push 0
push eax
call fcn.00432ab0
mov ecx, dword [ebp - 0x24]
add esp, 0x18
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.0040345f
push dword [ebp - 0x30]
mov ecx, eax
mov eax, 0x400
cmp dword [ecx + 0x204], eax
jb 0x404d2d
push eax
lea eax, [ebp]
push 1
push eax
call fcn.00435a1e
mov dword [ebp - 0x1c], eax
mov eax, 0x400
add esp, 0x10
cmp dword [ebp - 0x1c], eax
jne 0x404d99
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.00435b9d
add esp, 0x10
mov dword [ebp - 0x20], eax
jmp 0x404d99
mov ecx, dword [ebp - 0x24]
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.0040345f
push dword [eax + 0x204]
lea eax, [ebp]
push 1
push eax
call fcn.00435a1e
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.00435b9d
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.00401ac3
add esp, 0x28
cmp dword [ebp - 0x20], 0
je 0x404e0d
mov ecx, dword [ebp - 0x24]
push dword [ebp + 0x84c]
add ecx, 0x258
call fcn.0040345f
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.0040345f
cmp dword [eax + 0x204], 0
jne 0x404c94
push dword [ebp - 0x14]
call fcn.004335b1
mov dword [esp], 0x44de48
push edi
push esi
call fcn.00401ac3
mov ecx, dword [ebp - 0x24]
add esp, 0xc
push dword [ebp - 0x10]
add ecx, 0x14f8
call fcn.004022a4
xor esi, esi
inc esi
jmp 0x404e18
push dword [ebp - 0x14]
call fcn.004335b1
pop ecx
xor esi, esi
push ebx
call fcn.0041474d
pop ecx
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004026b1
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004026b1
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.004026b1
mov eax, esi
jmp 0x404bca