Function at 0x401e40
Capabilities:
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x41b004]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
call fcn.00404935
add esp, 4
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x401e6e
or eax, 0xffffffff
jmp 0x4022db
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call section..text
add esp, 8
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
mov eax, dword [ebp + 8]
push eax
push str.Decrypting:__ws_n
call fcn.00401780
add esp, 8
push 0
push 0x80
push 4
push 0
push 1
push 0x80000000
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x28], 0xffffffff
je 0x401ee3
cmp dword [ebp - 0x30], 0xffffffff
jne 0x401ef7
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0040491a
add esp, 4
or eax, 0xffffffff
jmp 0x4022db
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
push 0x4c
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 8]
push ecx
push 4
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401f57
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
cmp dword [ebp - 0x10], 0xaddeadde
je 0x401f88
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
push 0
push 0
push 0
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 8]
push edx
push 4
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401fda
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0040491a
add esp, 4
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
xor edx, edx
mov eax, dword [ebp - 0x20]
add eax, 1
setb dl
neg edx
or edx, eax
push edx
call fcn.00404935
add esp, 4
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x402023
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
push 0
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402073
mov edx, dword [ebp - 0x34]
push edx
call fcn.0040491a
add esp, 4
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0040491a
add esp, 4
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
push 0
push 1
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4020bd
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0040491a
add esp, 4
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
push 0x158
mov edx, dword [0x420d68]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00401490
add esp, 0xc
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x34]
push edx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.004015d0
add esp, 0x14
test eax, eax
jne 0x40212c
mov eax, dword [ebp - 0x34]
push eax
call fcn.0040491a
add esp, 4
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
push 0
push 0
push 0x50
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x24]
sub edx, 0x50
push edx
call fcn.00404935
add esp, 4
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x402193
mov eax, dword [ebp - 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0040491a
add esp, 4
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0x24]
sub eax, 0x50
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402205
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040491a
add esp, 4
mov ecx, dword [ebp - 0x1c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x34]
push edx
call fcn.0040491a
add esp, 4
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0040491a
add esp, 4
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
mov eax, dword [ebp - 0x1c]
push eax
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x38]
call fcn.004017c0
push 0
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402280
mov edx, dword [ebp - 0x38]
push edx
call fcn.0040491a
add esp, 4
mov eax, dword [ebp - 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0040491a
add esp, 4
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x4022db
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004016c0
add esp, 8
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040491a
add esp, 4
mov edx, dword [ebp - 0x1c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0040491a
add esp, 4
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402e83
mov esp, ebp
pop ebp
ret