Function at 0x622c82d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x18]
mov ecx, dword [eax]
mov ebx, dword [edi + 0x2c]
mov eax, ecx
div ebx
test esi, esi
je 0x622c8390
inc eax
mov esi, dword [ebp + 0xc]
imul ebx, eax
test esi, esi
je 0x622c855d
cmp ebx, dword [ebp + 0x14]
ja 0x622c83af
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov esi, ebx
add eax, ecx
add edx, ebx
cmp ebx, ecx
jbe 0x622c8344
mov dword [ebp - 0x4c], ebx
mov ebx, edx
mov dword [ebp + 8], edi
mov edi, dword [ebp + 0x10]
jmp 0x622c8332
mov ecx, dword [edi]
mov edx, esi
inc eax
sub edx, ecx
mov byte [eax - 1], dl
cmp ebx, eax
jne 0x622c8330
mov ebx, dword [ebp - 0x4c]
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x20]
mov dword [ebp - 0x58], 0
mov dword [eax], ebx
not esi
test ebx, ebx
je 0x622c8466
mov eax, dword [edi + 0x14]
cmp eax, 2
je 0x622c8518
cmp eax, 4
je 0x622c8470
cmp eax, 1
je 0x622c83d0
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80090008
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
test edx, edx
je 0x622c82f6
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80090005
add esp, 0x6c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xea
add esp, 0x6c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [edi + 0x2c]
xor eax, eax
test edx, edx
je 0x622c83ed
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x20]
nop
movzx ecx, byte [ebx + eax]
xor byte [edx + eax], cl
inc eax
cmp dword [edi + 0x2c], eax
ja 0x622c83e0
mov eax, dword [ebp + 0xc]
lea ebx, [ebp - 0x48]
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x54], ebx
mov dword [esp], eax
call sym._encrypt_block_impl
mov eax, dword [edi + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x20]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [edi + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._memcpy
mov ebx, dword [edi + 0x2c]
add dword [ebp - 0x58], ebx
add dword [ebp + 0xc], ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x58]
cmp dword [ebx], eax
ja 0x622c835d
mov eax, 1
jmp 0x622c8386
mov eax, dword [edi + 0x2c]
lea ebx, [ebp - 0x48]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x54], ebx
test eax, eax
je 0x622c8439
lea esi, [esi]
lea eax, [ebp - 0x30]
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 8], eax
mov eax, dword [edi + 0xc]
mov dword [esp], eax
call sym._encrypt_block_impl
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x54]
movzx eax, byte [eax + ebx]
xor al, byte [ebp - 0x30]
cmp dword [edi + 0x2c], 1
mov byte [ebp - 0x4d], al
mov byte [ecx + ebx], al
je 0x622c8558
mov eax, dword [ebp + 0x20]
inc eax
lea esi, [esi]
movzx edx, byte [eax]
mov ebx, eax
inc eax
mov byte [eax - 2], dl
mov ecx, dword [edi + 0x2c]
lea edx, [ecx - 1]
lea ecx, [esi + eax]
cmp edx, ecx
ja 0x622c84e0
movzx eax, byte [ebp - 0x4d]
inc dword [ebp - 0x4c]
mov byte [ebx], al
mov ebx, dword [ebp - 0x4c]
mov eax, dword [edi + 0x2c]
cmp eax, ebx
ja 0x622c8488
jmp 0x622c8439
lea eax, [ebp - 0x48]
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 8], eax
mov eax, dword [edi + 0xc]
mov dword [esp], eax
call sym._encrypt_block_impl
mov eax, dword [edi + 0x2c]
jmp 0x622c8439
mov ebx, dword [ebp + 0x20]
jmp 0x622c84f6
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
add esp, 0x6c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret