Function at 0x1004d590
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x18
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
test eax, eax
je 0x1004d8e8
mov dword [esp + 0x10], eax
lea eax, [esi + 0x10]
mov edi, ebp
mov dword [esp + 0xc], eax
mov ebp, dword [esp + 0x34]
jmp 0x1004d6db
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x1004d8f0
mov ebx, dword [esp + 0x3c]
movzx eax, byte [ebp]
movzx edx, byte [ebx]
xor al, dl
mov byte [edi], al
movzx ecx, byte [ebx + 1]
movzx eax, byte [ebp + 1]
xor al, cl
mov byte [edi + 1], al
movzx edx, byte [ebx + 2]
movzx eax, byte [ebp + 2]
xor al, dl
mov byte [edi + 2], al
movzx ecx, byte [ebx + 3]
movzx eax, byte [ebp + 3]
xor al, cl
mov byte [edi + 3], al
movzx edx, byte [ebx + 4]
movzx eax, byte [ebp + 4]
xor al, dl
mov byte [edi + 4], al
movzx ecx, byte [ebx + 5]
movzx eax, byte [ebp + 5]
xor al, cl
mov byte [edi + 5], al
movzx edx, byte [ebx + 6]
movzx eax, byte [ebp + 6]
xor al, dl
mov byte [edi + 6], al
movzx ecx, byte [ebx + 7]
movzx eax, byte [ebp + 7]
xor al, cl
mov ecx, edi
mov byte [edi + 7], al
movzx edx, byte [ebx + 8]
movzx eax, byte [ebp + 8]
xor al, dl
mov byte [edi + 8], al
movzx edx, byte [ebx + 9]
movzx eax, byte [ebp + 9]
xor al, dl
mov byte [edi + 9], al
movzx eax, byte [ebp + 0xa]
movzx edx, byte [ebx + 0xa]
xor al, dl
mov byte [edi + 0xa], al
movzx edx, byte [ebx + 0xb]
movzx eax, byte [ebp + 0xb]
xor al, dl
mov byte [edi + 0xb], al
movzx edx, byte [ebx + 0xc]
movzx eax, byte [ebp + 0xc]
xor al, dl
mov byte [edi + 0xc], al
movzx edx, byte [ebx + 0xd]
movzx eax, byte [ebp + 0xd]
xor al, dl
mov byte [edi + 0xd], al
movzx edx, byte [ebx + 0xe]
movzx eax, byte [ebp + 0xe]
xor al, dl
mov edx, edi
mov byte [edi + 0xe], al
movzx ebx, byte [ebx + 0xf]
movzx eax, byte [ebp + 0xf]
xor al, bl
mov byte [edi + 0xf], al
mov eax, esi
call fcn.1004d3b0
mov eax, dword [edi]
mov ebx, dword [esp + 0x3c]
mov dword [ebx], eax
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
mov dword [ebx + 0xc], eax
add ebp, 0x10
add edi, 0x10
dec dword [esp + 0x10]
je 0x1004d8e8
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x1004d5c8
mov edx, dword [esi + 0x10]
mov eax, dword [ebp]
mov dword [esp + 0x30], edi
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x34], ebp
mov ebx, dword [esi + 0x18]
xor eax, edx
mov edx, dword [esi + 0x1c]
mov dword [esp], eax
mov eax, dword [ebp + 4]
xor eax, ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
xor ecx, ebx
lea ebx, [esi + 0x90]
xor eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp]
rol ecx, 1
movzx edx, al
shr eax, 0x18
mov edx, dword [esi + edx*4 + 0xb4]
mov edi, dword [esi + eax*4 + 0xcb4]
mov eax, dword [esp]
xor edx, edi
movzx eax, ah
mov ebp, dword [esi + eax*4 + 0x4b4]
mov eax, dword [esp]
xor edx, ebp
shr eax, 0x10
movzx eax, al
mov edi, dword [esi + eax*4 + 0x8b4]
xor edx, edi
mov edi, dword [esp + 4]
mov eax, edi
rol eax, 8
shr edi, 0x18
mov ebp, eax
shr ebp, 0x18
mov edi, dword [esi + edi*4 + 0xb4]
xor edi, dword [esi + ebp*4 + 0xcb4]
movzx ebp, ah
shr eax, 0x10
xor edi, dword [esi + ebp*4 + 0x4b4]
movzx eax, al
mov ebp, dword [esi + eax*4 + 0x8b4]
xor edi, ebp
mov ebp, dword [ebx + 8]
add ebp, edx
mov eax, ebp
add eax, edi
xor ecx, eax
mov eax, dword [ebx + 0xc]
mov ebp, ecx
shr ebp, 0x18
mov ebp, dword [esi + ebp*4 + 0xcb4]
add edx, eax
lea eax, [edx + edi*2]
mov edx, dword [esp + 8]
xor edx, eax
movzx eax, ch
mov edi, edx
ror edx, 1
mov dword [esp + 8], edx
movzx edx, cl
mov edx, dword [esi + edx*4 + 0xb4]
xor edx, ebp
mov ebp, dword [esi + eax*4 + 0x4b4]
xor edx, ebp
mov ebp, ecx
shr ebp, 0x10
mov eax, ebp
movzx eax, al
mov ebp, dword [esi + eax*4 + 0x8b4]
xor edx, ebp
mov ebp, edi
rol ebp, 7
mov eax, ebp
shr ebp, 0x18
movzx edi, al
mov edi, dword [esi + edi*4 + 0xb4]
xor edi, dword [esi + ebp*4 + 0xcb4]
movzx ebp, ah
shr eax, 0x10
xor edi, dword [esi + ebp*4 + 0x4b4]
movzx eax, al
mov ebp, dword [esi + eax*4 + 0x8b4]
xor edi, ebp
mov ebp, dword [ebx]
add ebp, edx
mov eax, ebp
mov ebp, dword [esp]
add eax, edi
rol ebp, 1
sub ebx, 0x10
xor eax, ebp
mov dword [esp], eax
mov eax, dword [ebx + 0x14]
add edx, eax
lea eax, [edx + edi*2]
mov edi, dword [esp + 4]
xor eax, edi
ror eax, 1
cmp dword [esp + 0xc], ebx
mov dword [esp + 4], eax
jne 0x1004d720
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov ebx, dword [esp + 8]
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x34]
xor eax, ecx
mov ecx, dword [esi + 8]
mov dword [esp + 0x14], eax
xor ebx, edx
mov edx, dword [esp]
xor edx, ecx
mov ecx, dword [esp + 4]
mov dword [esp], edx
mov eax, edx
mov edx, dword [esi + 0xc]
xor ecx, edx
mov edx, dword [esp + 0x3c]
test edx, edx
je 0x1004d8c5
mov edx, dword [esp + 0x3c]
mov edx, dword [edx]
xor dword [esp + 0x14], edx
mov edx, dword [esp + 0x3c]
xor ebx, dword [edx + 4]
mov edx, dword [edx + 8]
xor eax, edx
mov edx, dword [esp + 0x3c]
mov dword [esp], eax
mov eax, dword [edx + 0xc]
xor ecx, eax
mov eax, dword [ebp]
mov dword [edx], eax
mov eax, edx
mov edx, dword [ebp + 4]
mov dword [eax + 4], edx
mov edx, dword [ebp + 8]
mov dword [eax + 8], edx
mov edx, dword [ebp + 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x14]
add ebp, 0x10
add edi, 0x10
mov dword [edi - 0xc], ebx
mov dword [edi - 4], ecx
mov dword [edi - 0x10], eax
mov eax, dword [esp]
mov dword [edi - 8], eax
dec dword [esp + 0x10]
jne 0x1004d6db
add esp, 0x18
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, ebp
mov edx, edi
mov eax, esi
call fcn.1004d3b0
jmp 0x1004d6cb