Function at 0x4082b0
Capabilities:
Clear file content
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427690
push 0x41ffe8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
sub esp, 0x108
push ebx
push esi
push edi
mov dword [ebp - 0x40], edx
mov edi, ecx
mov dword [ebp - 0x30], edi
xor eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x58], eax
mov esi, 1
mov dword [ebp - 0x48], esi
mov dword [ebp - 4], eax
push 0x118
push eax
push 0x42c500
call fcn.0040a690
xorps xmm0, xmm0
movq qword [0x42a2bc], xmm0
mov dword [0x42a2c4], 0
add esp, 8
mov edx, 0x426c24
call fcn.00406010
add esp, 4
test eax, eax
je 0x408372
push str.Error_initialize_cryptografy__n
call fcn.00408160
add esp, 4
xor esi, esi
mov dword [ebp - 4], 0xffffffff
call fcn.0040881e
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0
push 0x80
push 3
push 0
push 0
push 0xc0010000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x38], edi
cmp edi, 0xffffffff
jne 0x4083ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x30]
push str._s_open_file_error:__i_n
call fcn.00408160
add esp, 0xc
jmp 0x40834e
push 0x42c4f0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [0x42c4f0]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x60], eax
mov ecx, dword [0x42c4f4]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x5c], ecx
test ecx, ecx
ja 0x408400
jb 0x4083de
cmp eax, 0x3b0
jae 0x408400
cmp dword [ebp - 0x40], 0
je 0x40834e
push dword [ebp - 0x30]
push str._s_incorrect_file_size__n
call fcn.00408160
add esp, 8
jmp 0x40834e
test esi, esi
je 0x4087f8
xor esi, esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x24], esi
push esi
push esi
xor edx, edx
mov ecx, edi
call fcn.00408260
add esp, 8
push esi
lea eax, [ebp - 0x24]
push eax
push 0x5003b0
push dword [0x42c4f8]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x24]
xor ecx, ecx
cmp ecx, dword [ebp - 0x28]
ja 0x408481
jb 0x408446
cmp eax, dword [ebp - 0x2c]
jae 0x408481
mov esi, 0x280000
mov dword [ebp - 0x3c], esi
push 0xffffffffffffffff
push 0xffd7fc50
mov edx, 2
mov ecx, edi
call fcn.00408260
add esp, 8
push 0
lea eax, [ebp - 0x24]
push eax
push 0x2803c0
mov eax, dword [0x42c4f8]
add eax, esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x24]
lea edi, [eax - 0x3b0]
add edi, esi
mov dword [ebp - 0x3c], edi
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffc50
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x28]
adc eax, 0xffffffff
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x5c], eax
mov esi, dword [0x42c4f8]
add esi, edi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x24], 0
push 0x80
push 0
lea eax, [ebp - 0x120]
push eax
call fcn.0040a690
add esp, 8
lea eax, [ebp - 0x120]
push eax
push esi
lea eax, [ebp - 0x50]
push eax
sub esp, 8
call fcn.00406dc0
add esp, 0x18
test eax, eax
je 0x40850e
cmp dword [ebp - 0x40], 0
je 0x408506
push dword [ebp - 0x30]
push str._s_key_not_found__n
call fcn.00408160
add esp, 8
mov esi, dword [ebp - 0x34]
jmp 0x408350
xorps xmm0, xmm0
movups xmmword [ebp - 0x94], xmm0
movups xmmword [ebp - 0x84], xmm0
movzx eax, byte [esi + 0x3af]
neg eax
and eax, 0xf
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x98], eax
lea eax, [esi + 0x3a0]
mov dword [ebp - 0x54], eax
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x94], xmm0
xor esi, esi
mov eax, dword [0x42a2bc]
mov dword [ebp - 0x64], esi
cmp esi, 2
jge 0x4085af
test eax, eax
je 0x408568
push dword [0x42a2c0]
mov eax, dword [eax + 0x10]
call eax
add esp, 4
push 0x20
lea edx, [ebp - 0x94]
call fcn.00406070
add esp, 4
push dword [ebp - 0x50]
lea edx, [ebp - 0x120]
call fcn.00406070
add esp, 4
mov eax, dword [0x42a2bc]
test eax, eax
je 0x4085ac
lea ecx, [ebp - 0x94]
push ecx
push dword [0x42a2c0]
mov eax, dword [eax + 0x18]
call eax
add esp, 8
mov eax, dword [0x42a2bc]
inc esi
jmp 0x40854e
push ecx
lea edx, [ebp - 0x94]
call fcn.00402170
lea edx, [ebp - 0x94]
call fcn.004060a0
add esp, 4
mov eax, edi
shr eax, 0xd
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x9c], eax
mov edx, edi
and edx, 0x1fff
mov dword [ebp - 0x68], edx
mov dword [ebp - 0xa0], edx
mov ecx, dword [0x42c4f8]
mov esi, ecx
mov dword [ebp - 0x44], esi
mov eax, esi
sub eax, ecx
add eax, edx
cmp eax, edi
jae 0x408623
push 0x2000
mov edx, esi
mov ecx, dword [ebp - 0x54]
call fcn.00408190
add esp, 4
add esi, 0x4000
mov dword [ebp - 0x44], esi
mov ecx, dword [0x42c4f8]
mov edx, dword [ebp - 0x68]
jmp 0x4085f3
test dl, 0xf
jne 0x40865a
test byte [ebp - 0x6c], 1
jne 0x40863c
push edx
mov edx, esi
mov ecx, dword [ebp - 0x54]
call fcn.00408190
add esp, 4
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x60], ecx
mov ecx, dword [ebp - 0x28]
sbb ecx, 0
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x5c], ecx
sub edi, dword [ebp - 0x4c]
mov dword [ebp - 0x3c], edi
lea edx, [ebp - 0x94]
call fcn.004062b0
xor dl, dl
xor eax, eax
mov esi, dword [ebp - 0x70]
mov dword [ebp - 0x74], eax
cmp eax, 0x20
jge 0x408687
mov cl, byte [eax + esi + 0x380]
xor cl, byte [ebp + eax - 0x94]
or dl, cl
inc eax
jmp 0x40866c
test dl, dl
je 0x4086a3
push dword [ebp - 0x30]
push str._s_HMAC_check_failed:_wrong_key__or_file_corrupted._n
call fcn.00408160
add esp, 8
mov esi, dword [ebp - 0x34]
jmp 0x408350
mov eax, 1
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x58], eax
cmp edi, 0x3b0
jb 0x4086e8
mov edx, dword [0x42c4f8]
add edx, 0xfffffcd0
add edx, edi
lea ecx, [esi + 0x80]
mov esi, 0x2fc
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4086e8
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4086d0
mov eax, 1
jmp 0x4086ea
xor eax, eax
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x408778
test eax, eax
jne 0x408778
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
add esi, esi
lea edi, [esi + 0x10]
push edi
call fcn.0040ba54
add esp, 4
mov dword [ebp - 0x4c], eax
mov byte [eax], 1
mov dword [eax + 4], 0
mov dword [eax + 8], esi
push dword [ebp - 0x40]
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
mov esi, dword [ebp - 0x4c]
push esi
push 3
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_SetFileInformationByHandle]
test eax, eax
jne 0x40876c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x30]
push str._s_failed_rename._Eerror__i_._n
call fcn.00408160
add esp, 0xc
push esi
call fcn.0040ba6a
add esp, 4
mov esi, dword [ebp - 0x34]
jmp 0x408350
push esi
call fcn.0040ba6a
add esp, 4
mov edi, dword [ebp - 0x3c]
push 0
push 0
xor edx, edx
mov ecx, dword [ebp - 0x38]
call fcn.00408260
add esp, 8
mov esi, dword [0x42c4f8]
mov dword [ebp - 0x44], esi
cmp dword [ebp - 0x28], 0
jb 0x4087d7
ja 0x40879f
cmp dword [ebp - 0x2c], edi
jbe 0x4087d7
push 0
lea eax, [ebp - 0x24]
push eax
push 0x280000
push esi
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xffffffffffffffff
push 0xffd7fc50
mov edx, 2
mov ecx, dword [ebp - 0x38]
call fcn.00408260
add esp, 8
add esi, dword [ebp - 0x24]
mov dword [ebp - 0x44], esi
sub edi, dword [ebp - 0x24]
mov dword [ebp - 0x3c], edi
push 0
lea eax, [ebp - 0x24]
push eax
push edi
push esi
mov edi, dword [ebp - 0x38]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, dword [ebp - 0x48]
jmp 0x408400
mov esi, dword [ebp - 0x34]
test esi, esi
je 0x408350
push dword [ebp - 0x30]
push str._s_decrypted__n
call fcn.00408160
add esp, 8
jmp 0x408350