Function at 0x402330
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Get file size
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x450b26
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [0x46c074]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ecx, esi
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x120], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x11c], 0xf
mov byte [ebp - 0x130], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402390
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x130]
call fcn.00401eb0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x154]
push 0x18
push str.YAoCExAXHhkMHR0LFxgaBhBt
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 0xf
mov byte [ebp - 0x154], 0
call fcn.00401eb0
push 0
sub esp, 0x18
mov byte [ebp - 4], 1
lea edx, [ebp - 0x154]
mov ecx, esp
call fcn.00402140
lea ecx, [ebp - 0x16c]
call fcn.00402260
add esp, 0x18
lea ecx, [ebp - 0x130]
push eax
call fcn.004019d0
cmp eax, 0xffffffff
mov eax, dword [ebp - 0x158]
setne bl
cmp eax, 0x10
jb 0x40245c
mov ecx, dword [ebp - 0x16c]
inc eax
cmp eax, 0x1000
jb 0x402453
test cl, 0x1f
jne 0x4025cf
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x4025cf
sub ecx, eax
cmp ecx, 4
jb 0x4025cf
cmp ecx, 0x23
ja 0x4025cf
mov ecx, eax
push ecx
call fcn.0041bf0d
add esp, 4
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x140]
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x158], 0xf
mov byte [ebp - 0x16c], 0
cmp eax, 0x10
jb 0x4024c7
mov ecx, dword [ebp - 0x154]
inc eax
cmp eax, 0x1000
jb 0x4024be
test cl, 0x1f
jne 0x4025cf
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x4025cf
sub ecx, eax
cmp ecx, 4
jb 0x4025cf
cmp ecx, 0x23
ja 0x4025cf
mov ecx, eax
push ecx
call fcn.0041bf0d
add esp, 4
test bl, bl
jne 0x40276b
push 0x2000
call fcn.0041bf43
add esp, 4
mov ebx, eax
mov dword [ebp - 0x13c], ebx
push 0x1000
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x138]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0x134], eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40276b
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call esi
mov dword [ebp - 0x138], eax
cmp eax, 0xffffffff
je 0x40276b
push 0xf0000000
push 0x18
lea eax, [ebp - 0x104]
mov ecx, 0x1b
push eax
push 0
lea eax, [ebp - 0x108]
mov esi, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
lea edi, [ebp - 0x104]
rep movsd dword es:[edi], dword [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4025f8
lea eax, [ebp - 0x110]
push eax
push 0
push 0
push 0x800c
push dword [ebp - 0x108]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4025f8
push 0
push dword [ebp - 0x134]
push dword [ebp - 0x13c]
push dword [ebp - 0x110]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x4025d4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x40276b
call fcn.00437255
lea eax, [ebp - 0x114]
push eax
push 0
push dword [ebp - 0x110]
push 0x660e
push dword [ebp - 0x108]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x402618
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 0
push dword [ebp - 0x108]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
setne bl
jmp 0x40276d
push 0x80
lea eax, [ebp - 0x94]
push 0
push eax
call fcn.00433c30
add esp, 0xc
mov dword [ebp - 0x10c], 0
xor esi, esi
mov dword [ebp - 0x134], esi
push esi
push ebx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.DLL_ReadFile]
push esi
mov dword [ebp - 0x13c], eax
lea eax, [ebp - 0x10c]
push eax
push 0x80
lea eax, [ebp - 0x94]
push eax
push ebx
call edi
test eax, eax
je 0x402734
lea edx, [esi + 1]
nop word [eax + eax]
mov eax, dword [ebp - 0x10c]
test eax, eax
je 0x402734
mov ecx, dword [ebp - 0x134]
push 0x80
add ecx, eax
lea eax, [ebp - 0x10c]
cmp ecx, dword [ebp - 0x13c]
push eax
lea eax, [ebp - 0x94]
mov dword [ebp - 0x134], ecx
push eax
push 0
cmove esi, edx
push esi
push 0
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push 0
lea eax, [ebp - 0x118]
mov dword [ebp - 0x118], 0
push eax
push dword [ebp - 0x10c]
lea eax, [ebp - 0x94]
push eax
push dword [ebp - 0x138]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x402734
push 0x80
lea eax, [ebp - 0x94]
push 0
push eax
call fcn.00433c30
add esp, 0xc
lea eax, [ebp - 0x10c]
push 0
push eax
push 0x80
lea eax, [ebp - 0x94]
push eax
push ebx
call edi
mov edx, 1
test eax, eax
jne 0x402680
push 0
push dword [ebp - 0x108]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [ebp - 0x110]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push ebx
call esi
push dword [ebp - 0x138]
call esi
mov bl, 1
mov eax, dword [ebp - 0x11c]
cmp eax, 0x10
jb 0x4027b9
mov ecx, dword [ebp - 0x130]
inc eax
cmp eax, 0x1000
jb 0x4027b0
test cl, 0x1f
jne 0x4025cf
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x4025cf
sub ecx, eax
cmp ecx, 4
jb 0x4025cf
cmp ecx, 0x23
ja 0x4025cf
mov ecx, eax
push ecx
call fcn.0041bf0d
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041bb6a
mov esp, ebp
pop ebp
ret 0xc