Function at 0x40ae20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x420ab1
mov eax, dword fs:[0]
push eax
sub esp, 0x474
mov eax, dword [0x433fbc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x434], esi
mov eax, dword [esi + 0x60]
mov ecx, 0x4342d0
mov dword [ebp - 0x428], eax
mov edi, 6
lea eax, [ebp - 0x428]
push eax
call fcn.004025d0
mov dword [ebp - 0x44c], 0
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 0
mov eax, dword [eax + 0x48]
mov dword [ebp - 0x428], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x454], 0
mov dword [ebp - 0x450], 0
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x43c], 0
mov dword [ebp - 0x438], 0
movaps xmm0, xmmword [0x427160]
lea eax, [ebp - 0x480]
push 0x400
mov dword [ebp - 0x468], eax
lea eax, [ebp - 0x420]
push 0x55
push eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x46c], 0x1087
mov dword [ebp - 0x464], 0x14
mov byte [ebp - 0x421], 0
movups xmmword [ebp - 0x20], xmm0
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0x20]
mov dword [ebp - 0x470], 0x80
mov dword [ebp - 0x480], eax
add esp, 0xc
mov eax, dword [esi + 0xe8]
shr eax, 3
mov dword [ebp - 0x47c], eax
lea eax, [ebp - 0x420]
mov dword [ebp - 0x478], eax
mov eax, dword [esi + 0xf0]
mov dword [ebp - 0x474], eax
mov eax, dword [ebp - 0x428]
push eax
lea ecx, [eax + 0x30]
mov dword [ebp - 0x45c], ecx
mov dword [ebp - 0x42c], ecx
lea ecx, [eax + 0x10]
mov dword [ebp - 0x460], ecx
mov dword [ebp - 0x430], ecx
lea ecx, [ebp - 0x44c]
call fcn.0040a4a0
push dword [ebp - 0x42c]
lea ecx, [ebp - 0x458]
call fcn.0040a4a0
push dword [ebp - 0x430]
lea ecx, [ebp - 0x440]
call fcn.0040a4a0
cmp dword [ebp - 0x428], 0
jbe 0x40b00b
mov edx, dword [0x4328f4]
xor esi, esi
mov edi, dword [ebp - 0x428]
nop dword [eax]
mov ecx, edx
lea eax, [edx + edx]
shr ecx, 0x19
xor ecx, edx
shr ecx, 1
xor ecx, edx
shr ecx, 4
xor ecx, edx
shr ecx, 1
and ecx, 1
mov edx, ecx
or edx, eax
mov eax, dword [ebp - 0x44c]
mov byte [eax + esi], dl
inc esi
cmp esi, edi
jb 0x40afd0
mov esi, dword [ebp - 0x434]
mov edi, 6
mov dword [0x4328f4], edx
mov al, byte [0x4342c8]
test al, al
jne 0x40b293
nop dword [eax + eax]
cmp byte [esi + 0xb1], 0
jne 0x40b052
nop dword [eax]
push 1
call fcn.00401170
add esp, 4
cmp byte [0x4342c8], 0
jne 0x40b293
cmp byte [esi + 0xb1], 0
je 0x40b030
jmp 0x40b05a
test al, al
jne 0x40b293
cmp byte [esi + 0x6c], 0
jne 0x40b069
cmp byte [ebp - 0x421], 0
jne 0x40b0da
mov eax, dword [ebp - 0x45c]
push dword [esi + 0x2c]
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x46c]
push eax
push dword [esi + 0x64]
call sub.cryptoki.dll_C_EncryptInit
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40b26f
lea eax, [ebp - 0x42c]
push eax
push dword [ebp - 0x458]
push dword [ebp - 0x428]
push dword [ebp - 0x44c]
push dword [esi + 0x64]
call sub.cryptoki.dll_C_Encrypt
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x40b25d
cmp dword [ebp - 0x46c], 0x80000966
jne 0x40b0da
mov eax, dword [ebp - 0x47c]
sub dword [ebp - 0x42c], eax
cmp byte [esi + 0x6d], 0
mov byte [ebp - 0x421], 1
je 0x40b18e
mov eax, dword [ebp - 0x460]
push dword [esi + 0x2c]
mov dword [ebp - 0x430], eax
lea eax, [ebp - 0x46c]
push eax
push dword [esi + 0x64]
call sub.cryptoki.dll_C_DecryptInit
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40b24b
lea eax, [ebp - 0x430]
push eax
push dword [ebp - 0x440]
push dword [ebp - 0x42c]
push dword [ebp - 0x458]
push dword [esi + 0x64]
call sub.cryptoki.dll_C_Decrypt
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x40b239
cmp byte [esi + 0x51], al
je 0x40b18e
mov ecx, dword [ebp - 0x430]
mov eax, dword [ebp - 0x428]
cmp ecx, eax
jne 0x40b21a
xor edx, edx
test eax, eax
je 0x40b18e
mov eax, dword [ebp - 0x44c]
mov ecx, dword [ebp - 0x440]
sub eax, ecx
mov dword [ebp - 0x434], eax
mov al, byte [eax + ecx]
cmp al, byte [ecx]
jne 0x40b1e3
mov eax, dword [ebp - 0x434]
inc edx
inc ecx
cmp edx, dword [ebp - 0x428]
jb 0x40b177
mov edx, dword [ebp - 0x428]
sub esp, 8
mov eax, edx
shr eax, 0x1f
movd xmm0, edx
cvtdq2pd xmm0, xmm0
mov dword [esp + 4], 0x3f800000
addsd xmm0, qword [eax*8 + 0x427150]
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [0x427128]
movss dword [esp], xmm0
push dword [esi + 0x54]
call fcn.00415cd0
mov al, byte [0x4342c8]
add esp, 0xc
test al, al
je 0x40b020
jmp 0x40b293
mov eax, dword [ebp - 0x440]
movzx eax, byte [eax + edx]
push eax
mov eax, dword [ebp - 0x44c]
movzx eax, byte [eax + edx]
push eax
push edx
push str._nDecrypted_data_doesnt_match_source_data__byte__lu__source__02x__result__02x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004148f0
add esp, 0x14
mov edi, 0x20
jmp 0x40b293
push eax
push ecx
push str._nDecrypted_data_length__lu_doesnt_match_source_data_length__lu_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004148f0
mov edi, 0x21
jmp 0x40b290
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_Decrypt_n
jmp 0x40b27f
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_DecryptInit_n
jmp 0x40b27f
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_Encrypt_n
jmp 0x40b27f
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_EncryptInit_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004148f0
add esp, 0x10
mov dword [esi + 0x24], edi
mov esi, dword [ebp - 0x440]
test esi, esi
je 0x40b2cc
mov ecx, dword [ebp - 0x438]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x40b2c2
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b32e
push ecx
push esi
call fcn.0041e5a7
add esp, 8
mov edx, dword [ebp - 0x458]
test edx, edx
je 0x40b302
mov ecx, dword [ebp - 0x450]
mov eax, edx
sub ecx, edx
cmp ecx, 0x1000
jb 0x40b2f8
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b32e
push ecx
push edx
call fcn.0041e5a7
add esp, 8
mov ecx, dword [ebp - 0x44c]
test ecx, ecx
je 0x40b33e
mov edx, dword [ebp - 0x444]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40b334
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40b334
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0041e5a7
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041e5b5
mov esp, ebp
pop ebp
ret