Function at 0x470920
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x5428f8]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor bl, bl
movzx eax, byte [eax + ecx - 1]
push edi
mov edi, ecx
mov dword [ebp - 0x48], edx
sub ecx, eax
mov byte [ebp - 0x49], bl
sub edi, esi
dec ecx
sub edi, 0x100
mov dword [ebp - 0x58], ecx
mov eax, edi
sub ecx, esi
not eax
sar eax, 0x1f
and edi, eax
mov eax, ecx
not eax
mov dword [ebp - 0x50], edi
sar eax, 0x1f
and ecx, eax
lea eax, [esi - 1]
mov edx, eax
mov dword [ebp - 0x54], ecx
and edx, esi
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], edx
jne 0x470995
mov edi, esi
sub edi, dword [ebp - 0x50]
add edi, ecx
and edi, eax
mov dword [ebp - 0x48], edi
mov edi, dword [ebp - 0x50]
jmp 0x4709b7
cmp esi, 0x14
jne 0x4709a4
mov eax, ecx
mov ecx, esi
sub eax, edi
add eax, esi
jmp 0x4709b1
cmp esi, 0x30
jne 0x4709b7
mov eax, ecx
mov ecx, esi
sub eax, edi
add eax, esi
cdq
idiv ecx
mov dword [ebp - 0x48], edx
push esi
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.004bd260
mov edx, dword [ebp + 0xc]
add esp, 0xc
cmp edi, edx
jge 0x470a37
lea eax, [ebp - 0x44]
mov ebx, edi
sub ebx, eax
sub eax, dword [ebp - 0x54]
mov dword [ebp - 0x54], eax
nop word [eax + eax]
xor eax, eax
test esi, esi
jle 0x470a29
lea ecx, [ebp - 0x44]
add ecx, eax
add ecx, ebx
cmp ecx, edx
jge 0x470a26
mov edx, dword [ebp - 0x58]
lea edi, [ebp - 0x44]
mov ecx, dword [ebp - 0x54]
sub edx, eax
sub edx, dword [ebp - 0x50]
add ecx, ebx
add ecx, eax
dec edx
shr edx, 0x1f
shr ecx, 0x1f
dec dl
dec cl
and dl, cl
lea ecx, [ebp - 0x44]
add ecx, dword [ebp + 8]
add ecx, ebx
and dl, byte [ecx + eax]
or byte [edi + eax], dl
inc eax
mov edx, dword [ebp + 0xc]
cmp eax, esi
jl 0x4709e6
mov edi, dword [ebp - 0x50]
add edi, esi
add ebx, esi
mov dword [ebp - 0x50], edi
cmp edi, edx
jl 0x4709e0
mov bl, byte [ebp - 0x49]
cmp dword [ebp - 0x5c], 0
jne 0x470a79
test esi, esi
jle 0x470ae6
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp + 0x14]
sub eax, edx
mov edi, dword [ebp - 0x60]
lea ecx, [eax + edx]
and ecx, edi
lea edx, [edx + 1]
mov cl, byte [ebp + ecx - 0x44]
xor cl, byte [edx - 1]
or bl, cl
sub esi, 1
jne 0x470a50
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049bafa
mov esp, ebp
pop ebp
ret
cmp esi, 0x14
jne 0x470ab9
mov eax, dword [ebp - 0x48]
mov edi, esi
mov ecx, dword [ebp + 0x14]
sub eax, ecx
mov dword [ebp - 0x48], eax
nop dword [eax + eax]
add eax, ecx
cdq
idiv edi
mov al, byte [ebp + edx - 0x44]
xor al, byte [ecx]
inc ecx
or bl, al
mov eax, dword [ebp - 0x48]
sub esi, 1
jne 0x470a90
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049bafa
mov esp, ebp
pop ebp
ret
cmp esi, 0x30
jne 0x470ae6
mov eax, dword [ebp - 0x48]
mov edi, esi
mov ecx, dword [ebp + 0x14]
sub eax, ecx
mov dword [ebp - 0x48], eax
nop dword [eax + eax]
add eax, ecx
cdq
idiv edi
mov al, byte [ebp + edx - 0x44]
xor al, byte [ecx]
inc ecx
or bl, al
mov eax, dword [ebp - 0x48]
sub esi, 1
jne 0x470ad0
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049bafa
mov esp, ebp
pop ebp
ret