Function at 0x622d6580
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x6c
cmp dword [ebp + 0x10], 0x40
mov dword [ebp - 0x3c], eax
je 0x622d6608
mov eax, 2
cmp ecx, 2
jbe 0x622d65ab
nop
cmp byte [ebx + eax], 0
je 0x622d65c8
inc eax
cmp ecx, eax
jne 0x622d65a0
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80090005
xor edx, edx
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ecx, eax
je 0x622d65ab
mov esi, dword [ebp + 0xc]
dec ecx
sub ecx, eax
cmp dword [esi], ecx
jb 0x622d65ab
cmp byte [ebx], 0
jne 0x622d65ab
cmp byte [ebx + 1], 2
jne 0x622d65ab
mov edi, dword [ebp + 0xc]
lea eax, [ebx + eax + 1]
mov dword [edi], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_memmove]
mov edx, 1
jmp 0x622d65ba
mov edi, dword [ebp - 0x3c]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x40], ecx
lea esi, [ebp - 0x30]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x8004
mov dword [esp], edi
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], edi
call sym.rsaenh.dll_CPHashData
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x30], 4
sub esp, 0x14
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], esi
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov dword [esp], edi
call sym.rsaenh.dll_CPGetHashParam
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x40]
sub esp, 0x18
lea eax, [edx + edx + 2]
cmp ecx, eax
jae 0x622d6730
mov dword [ebp - 0x44], 0
xor edx, edx
mov dword [ebp - 0x40], 0
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80090005
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x48], edx
mov dword [esp], eax
call sym.rsaenh.dll_CPDestroyHash
mov eax, dword [ebp - 0x44]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
sub esp, 8
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x48]
lea esp, [ebp - 0xc]
pop ebx
pop esi
mov eax, edx
pop edi
pop ebp
ret
mov dword [ebp - 0x48], ecx
mov edi, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], edx
mov dword [ebp - 0x40], edx
call edi
mov ecx, dword [ebp - 0x48]
mov edx, eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x34]
test edx, edx
mov edx, dword [ebp - 0x40]
je 0x622d692e
mov dword [esp + 0x10], esi
mov esi, dword [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 2
mov dword [esp], eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x30], edx
call sym.rsaenh.dll_CPGetHashParam
mov ecx, dword [ebp - 0x40]
sub esp, 0x18
lea eax, [ecx - 1]
mov dword [ebp - 0x48], ecx
mov dword [esp], eax
call edi
mov ecx, dword [ebp - 0x48]
test eax, eax
mov dword [ebp - 0x40], eax
je 0x622d6917
mov esi, dword [ebp - 0x2c]
mov eax, esi
mov dword [esp], esi
lea edi, [ebx + esi + 1]
not eax
mov edx, edi
add eax, ecx
mov dword [ebp - 0x48], eax
mov ecx, eax
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
call sym._pkcs1_mgf1
mov edx, eax
test eax, eax
je 0x622d68f0
mov ecx, dword [ebp - 0x1c]
xor eax, eax
test esi, esi
je 0x622d67fc
mov dword [ebp - 0x4c], edi
mov edi, dword [ebp - 0x40]
lea esi, [esi]
inc eax
movzx edx, byte [ebx + eax]
xor dl, byte [ecx + eax - 1]
mov byte [edi + eax - 1], dl
cmp esi, eax
jne 0x622d67e8
mov edi, dword [ebp - 0x4c]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x40]
mov ecx, esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
call sym._pkcs1_mgf1
mov edx, eax
test eax, eax
je 0x622d68f0
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x48]
lea ecx, [eax + esi]
mov esi, dword [ebp - 0x24]
xor eax, eax
test edx, edx
je 0x622d6852
mov dword [ebp - 0x4c], ebx
mov ebx, dword [ebp - 0x48]
lea esi, [esi]
nop
movzx edx, byte [edi + eax]
xor dl, byte [esi + eax]
mov byte [ecx + eax], dl
inc eax
cmp ebx, eax
jne 0x622d6840
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x2c]
xor edi, edi
mov dword [ebp - 0x4c], eax
lea esi, [eax + 1]
mov eax, dword [ebp - 0x48]
cmp esi, dword [ebp - 0x48]
jbe 0x622d687a
jmp 0x622d6900
inc esi
inc edi
cmp eax, esi
jb 0x622d6900
cmp byte [ecx + esi - 1], 0
lea edx, [esi - 1]
je 0x622d6870
mov dword [ebp - 0x54], edx
cmp esi, dword [ebp - 0x48]
ja 0x622d6900
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x44]
mov dword [esp], ecx
mov dword [ebp - 0x50], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sym._memcmp
cmp byte [ebx], 0
jne 0x622d6900
test eax, eax
jne 0x622d6900
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
cmp byte [ecx + edx], 1
jne 0x622d6900
mov eax, dword [ebp - 0x4c]
not eax
add eax, dword [ebp - 0x48]
sub eax, edi
mov edi, dword [ebp + 0xc]
cmp eax, dword [edi]
ja 0x622d6900
mov edi, dword [ebp + 0xc]
add esi, ecx
mov dword [edi], eax
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._memcpy
mov edx, 1
lea esi, [esi]
mov eax, dword [ebp - 0x34]
jmp 0x622d66e3
mov eax, dword fs:[0x18]
xor edx, edx
mov dword [eax + 0x34], 0x80090005
mov eax, dword [ebp - 0x34]
jmp 0x622d66e3
mov eax, dword fs:[0x18]
xor edx, edx
mov dword [eax + 0x34], 0x8009000e
mov eax, dword [ebp - 0x34]
jmp 0x622d66e3
mov edx, dword fs:[0x18]
mov dword [ebp - 0x40], 0
mov dword [edx + 0x34], 0x8009000e
xor edx, edx
jmp 0x622d66e3