Function at 0x622d3210
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
push ebx
mov ebx, ecx
sub esp, 0x6c
cmp dword [ebp + 0x10], 0x40
je 0x622d3300
mov eax, dword [ebp + 0xc]
sub eax, 0xb
cmp ecx, eax
jbe 0x622d3250
xor ebx, ebx
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80090004
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
sub esi, ecx
add eax, esi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_memmove]
mov eax, dword [ebp + 8]
mov edx, 0x200
mov word [eax], dx
lea eax, [esi - 1]
mov dword [ebp - 0x3c], eax
cmp eax, 2
jbe 0x622d35b1
mov eax, dword [ebp + 8]
lea ebx, [eax + 2]
lea edi, [eax + esi - 1]
nop
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._gen_rand_impl
cmp byte [ebx], 0
je 0x622d3290
inc ebx
cmp ebx, edi
jne 0x622d3290
mov ebx, dword [ebp - 0x3c]
test byte [ebp + 0x10], 2
je 0x622d32e5
lea edi, [ebx - 8]
cmp dword [ebp - 0x3c], edi
jbe 0x622d35bb
add esi, 7
mov dword [esp + 4], 3
mov eax, esi
add esi, edi
sub eax, ebx
sub esi, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov ebx, esi
add eax, edi
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp + 8]
mov byte [eax + ebx], 0
lea esp, [ebp - 0xc]
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, eax
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x8004
mov dword [esp], esi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
call sym.rsaenh.dll_CPCreateHash
mov eax, dword [ebp - 0x34]
sub esp, 0x14
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call sym.rsaenh.dll_CPHashData
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 4
sub esp, 0x14
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x14], 0
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov dword [esp], esi
call sym.rsaenh.dll_CPGetHashParam
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp + 0xc]
sub esp, 0x18
lea eax, [edx + edx]
sub ecx, eax
sub ecx, 2
cmp ebx, ecx
ja 0x622d3596
lea ecx, [edx + 1]
add eax, 2
cmp dword [ebp + 0xc], eax
jae 0x622d341a
mov eax, dword fs:[0x18]
mov dword [ebp - 0x3c], 0
xor ebx, ebx
mov dword [eax + 0x34], 0xea
mov eax, dword [ebp - 0x34]
mov dword [esp], esi
mov dword [esp + 4], eax
call sym.rsaenh.dll_CPDestroyHash
mov eax, dword [ebp - 0x3c]
mov esi, dword [sym.imp.ucrtbase.dll_free]
sub esp, 8
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call esi
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x44]
test eax, eax
mov dword [ebp - 0x3c], eax
je 0x622d35c2
mov eax, dword [ebp - 0x3c]
add ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x44], ecx
mov byte [eax], 0
inc eax
mov dword [ebp - 0x48], eax
mov eax, edx
lea edx, [ebp - 0x30]
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x4c]
not eax
mov dword [esp + 0xc], ecx
add eax, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp + 0x14], 0
mov dword [esp + 8], 2
mov dword [esp], esi
mov dword [ebp - 0x40], eax
call sym.rsaenh.dll_CPGetHashParam
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x40]
sub esp, 0x18
mov edx, ecx
mov dword [esp + 4], 0
not edx
mov dword [ebp - 0x4c], ecx
add eax, edx
mov edx, dword [ebp - 0x44]
sub eax, ebx
add edx, ecx
mov dword [esp + 8], eax
mov dword [esp], edx
call sym._memset
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x44]
sub eax, ebx
mov byte [ecx + eax - 1], 1
add eax, ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._memcpy
mov ebx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x4c]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call sym._gen_rand_impl
mov edi, dword [ebp - 0x40]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov edx, ebx
mov eax, esi
mov dword [esp], edi
call sym._pkcs1_mgf1
mov ebx, eax
test eax, eax
je 0x622d33e0
test edi, edi
je 0x622d352b
mov edi, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x24]
mov eax, edi
add ecx, edi
lea esi, [esi]
movzx ebx, byte [edx]
xor byte [eax], bl
inc eax
inc edx
cmp eax, ecx
jne 0x622d3520
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
mov eax, esi
call sym._pkcs1_mgf1
mov ebx, eax
test eax, eax
je 0x622d33e0
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x622d3573
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x1c]
lea ecx, [edi + ecx + 1]
lea esi, [esi]
nop
movzx ebx, byte [edx]
xor byte [eax], bl
inc eax
inc edx
cmp ecx, eax
jne 0x622d3568
mov eax, dword [ebp + 0xc]
mov ebx, 1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._memcpy
jmp 0x622d33e0
mov eax, dword fs:[0x18]
mov dword [ebp - 0x3c], 0
xor ebx, ebx
mov dword [eax + 0x34], 0x80090004
jmp 0x622d33e0
mov ebx, 2
jmp 0x622d32ad
mov ebx, edi
jmp 0x622d32e5
mov eax, dword fs:[0x18]
xor ebx, ebx
mov dword [eax + 0x34], 0x8009000e
jmp 0x622d33e0