Function at 0x40ee80
Capabilities:
Encode data using xor
Encrypt or decrypt data via bcrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b38cb
mov eax, dword fs:[0]
push eax
sub esp, 0x90
push ebx
push esi
push edi
mov eax, dword [0x4ef52c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x6c], edx
mov esi, ecx
mov dword [ebp - 0x18], esi
mov eax, dword [edx]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x64], 0
cmp eax, dword [edx + 4]
jne 0x40ef12
mov dword [esi], 0
mov eax, esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0x4db064
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x40eeea
push 0
lea eax, [ebp - 0x98]
push eax
push 4
lea eax, [ebp - 0x70]
push eax
mov eax, dword [sym.imp.bcrypt.dll_BCryptGetProperty]
push str.ObjectLength
push dword [ebp - 0x48]
mov dword [ebp - 0x1c], eax
call eax
test eax, eax
js 0x40eeea
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x40ef88
push ecx
push eax
lea ecx, [ebp - 0x54]
lfence
call fcn.00403060
mov ebx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x54]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], edi
push 0
lea eax, [ebp - 0x98]
mov dword [ebp - 4], 0
push eax
push 4
lea eax, [ebp - 0x64]
push eax
push str.BlockLength
push dword [ebp - 0x48]
call dword [ebp - 0x1c]
test eax, eax
jns 0x40f024
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test edi, edi
je 0x40fae0
sub ebx, edi
mov eax, edi
cmp ebx, 0x1000
jb 0x40efe9
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push ebx
push edi
call fcn.0048846f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
xor eax, eax
xor edx, edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x58], eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x40f060
push ecx
push eax
lea ecx, [ebp - 0x60]
lfence
call fcn.00403060
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 4], 3
cmp ecx, edx
je 0x40f0b4
sub edx, ecx
mov dword [ebp - 0x1c], edx
je 0x40f0b4
mov al, 0x22
mov esi, edx
xor ebx, ebx
mov edi, 0x2b
nop dword [eax]
movzx eax, al
xor edx, edx
add eax, edi
mov edi, 0x32
div edi
movzx eax, byte [edx + 0x4cbe08]
xor eax, edx
xor edx, edx
div edi
mov edi, edx
mov al, byte [edi + 0x4cbe08]
mov byte [ecx + ebx], al
inc ebx
cmp ebx, esi
jb 0x40f080
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
push 0
push 0x20
push str.ChainingModeCBC
push str.ChainingMode
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptSetProperty]
test eax, eax
jns 0x40f17e
mov ecx, dword [ebp - 0x2c]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test ecx, ecx
je 0x40f11b
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f111
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
test edi, edi
je 0x40fae0
sub ebx, edi
mov eax, edi
cmp ebx, 0x1000
jb 0x40f143
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push ebx
push edi
call fcn.0048846f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
push ecx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x40]
push 0x20
lfence
call fcn.00403060
mov dword [ebp - 4], 6
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], edx
cmp edx, eax
je 0x40f28a
mov ecx, dword [ebp + 0x10]
sub eax, edx
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov ecx, dword [ecx + 4]
mov esi, dword [esi]
cmp esi, ecx
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x18]
jne 0x40f1eb
push eax
push 0
push edx
call fcn.0048ba70
mov edx, dword [ebp - 0x28]
add esp, 0xc
jmp 0x40f287
sub ecx, dword [ebp - 0x20]
mov dword [ebp - 0x30], ecx
cmp eax, ecx
jae 0x40f246
push eax
push dword [ebp - 0x20]
push edx
call fcn.0048b4f0
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp + 0x10]
inc dword [ebp - 0x1c]
mov eax, dword [eax]
movzx ecx, byte [ecx + eax]
mov eax, dword [ebp - 0x14]
movzx eax, byte [edx + eax]
imul ecx, eax
mov eax, dword [ebp - 0x14]
shr ecx, 4
mov byte [edx + eax], cl
inc eax
cmp eax, dword [ebp - 0x24]
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x30]
jb 0x40f212
jmp 0x40f287
xor ecx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], ecx
test eax, eax
je 0x40f287
mov esi, dword [ebp - 0x30]
cmp eax, esi
cmovb esi, eax
lea eax, [edx + ecx]
mov ecx, dword [ebp + 0x10]
push esi
push dword [ecx]
push eax
call fcn.0048b4f0
mov ecx, dword [ebp - 0x20]
add esp, 0xc
mov eax, dword [ebp - 0x14]
add ecx, esi
mov edx, dword [ebp - 0x28]
sub eax, esi
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x14], eax
cmp ecx, dword [ebp - 0x24]
jb 0x40f252
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x3c]
push 0
sub eax, edx
push eax
push edx
push dword [ebp - 0x70]
lea eax, [ebp - 0x68]
push edi
push eax
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
jns 0x40f36b
mov ecx, dword [ebp - 0x28]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test ecx, ecx
je 0x40f2f1
mov edx, dword [ebp - 0x38]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f2e7
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40f325
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f31b
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
test edi, edi
je 0x40fae0
sub ebx, edi
mov eax, edi
cmp ebx, 0x1000
jb 0x40f34d
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push ebx
push edi
call fcn.0048846f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x6c]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
xor ecx, ecx
sub edx, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x74], ecx
mov byte [ebp - 4], 0xa
test edx, edx
je 0x40f3ba
push ecx
push edx
lea ecx, [ebp - 0x7c]
lfence
call fcn.00403060
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x24], eax
push edx
push dword [ebp - 0x14]
mov dword [ebp - 4], 9
push eax
call fcn.0048b4f0
add esp, 0xc
lea eax, [ebp - 0x44]
push 1
push eax
mov eax, dword [sym.imp.bcrypt.dll_BCryptDecrypt]
push 0
push 0
push dword [ebp - 0x64]
mov dword [ebp - 0x6c], eax
push dword [ebp - 0x2c]
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x68]
call eax
test eax, eax
jns 0x40f50e
mov ecx, dword [ebp - 0x24]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test ecx, ecx
je 0x40f443
mov edx, dword [ebp - 0x1c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f439
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x40f477
mov edx, dword [ebp - 0x38]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f46d
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40f4ab
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f4a1
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
test edi, edi
je 0x40fae0
sub ebx, edi
mov eax, edi
cmp ebx, 0x1000
jb 0x40f4d3
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push ebx
push edi
call fcn.0048846f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x80], ecx
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x44]
test edx, edx
je 0x40f554
push ecx
push edx
lea ecx, [ebp - 0x88]
lfence
call fcn.00403060
mov ecx, dword [ebp - 0x80]
mov eax, dword [ebp - 0x88]
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x30], eax
push 1
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0xc
push ecx
push edx
push eax
push dword [ebp - 0x64]
push dword [ebp - 0x2c]
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x68]
call dword [ebp - 0x6c]
test eax, eax
jns 0x40f6c6
mov ecx, dword [ebp - 0x30]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test ecx, ecx
je 0x40f5c7
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f5bd
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40f5fb
mov edx, dword [ebp - 0x1c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f5f1
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x40f62f
mov edx, dword [ebp - 0x38]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f625
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40f663
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f659
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
test edi, edi
je 0x40fae0
sub ebx, edi
mov eax, edi
cmp ebx, 0x1000
jb 0x40f68b
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push ebx
push edi
call fcn.0048846f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x68]
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test eax, eax
jns 0x40f801
mov ecx, dword [ebp - 0x30]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test ecx, ecx
je 0x40f71f
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f715
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40f753
mov edx, dword [ebp - 0x1c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f749
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x40f787
mov edx, dword [ebp - 0x38]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f77d
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40f7bb
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f7b1
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
test edi, edi
je 0x40fae0
sub ebx, edi
mov eax, edi
cmp ebx, 0x1000
jb 0x40f7e3
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push ebx
push edi
call fcn.0048846f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x40f83d
push ecx
push eax
lea ecx, [ebp - 0x94]
lfence
call fcn.00403060
mov eax, dword [ebp - 0x44]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x94]
call fcn.0048b4f0
mov eax, dword [ebp - 0x94]
add esp, 0xc
mov ecx, dword [ebp - 0x30]
mov dword [esi], eax
mov eax, dword [ebp - 0x90]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x8c]
mov dword [esi + 8], eax
test ecx, ecx
je 0x40f89d
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f893
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40f8d1
mov edx, dword [ebp - 0x1c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f8c7
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x40f905
mov edx, dword [ebp - 0x38]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f8fb
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40f939
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f92f
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push edx
push ecx
call fcn.0048846f
add esp, 8
test edi, edi
je 0x40fae0
sub ebx, edi
mov eax, edi
cmp ebx, 0x1000
jb 0x40f961
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fba3
push ebx
push edi
call fcn.0048846f
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0048ed7f
int3