Function at 0x4f47d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [0x5be9a0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebx + 0x28]
push edx
lea esi, [edi + 4]
push esi
mov dword [ebp - 0xa8], eax
call fcn.0045a0b0
add esp, 0xc
push 0
push esi
call fcn.004565d0
add esp, 8
test eax, eax
jne 0x4f482a
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bc40c
mov esp, ebp
pop ebp
ret
mov esi, 1
cmp dword [ebx], esi
jbe 0x4f4859
lea eax, [edi + 0x10]
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
push 0
push ecx
call fcn.00456980
add dword [ebp - 0xa4], 0xc
inc esi
add esp, 8
cmp esi, dword [ebx]
jb 0x4f483c
mov eax, dword [ebp + 0xc]
dec eax
push eax
lea edx, [esi + esi*2]
lea eax, [edi + edx*4 + 4]
push eax
mov dword [edi], esi
call fcn.00456980
mov ecx, dword [edi]
add esp, 8
mov dword [ebp - 0x10], ecx
xor esi, esi
lea ebx, [edi + 4]
lea ebx, [ebx]
mov edx, dword [ebp + 0xc]
push edx
push ebx
call fcn.0045ddd0
mov dword [ebp + esi*4 - 0x54], eax
inc esi
add esp, 8
add ebx, 0xc
cmp esi, dword [edi]
jbe 0x4f4880
mov ecx, dword [ebp - 0x10]
test ecx, ecx
jle 0x4f48ac
cmp dword [ebp + ecx*4 - 0x54], 0
jne 0x4f48ac
dec ecx
test ecx, ecx
jg 0x4f48a0
mov eax, ecx
mov dword [ebp - 0x10], eax
test ecx, ecx
je 0x4f4817
mov esi, dword [ebp - 0x54]
xor edi, edi
mov dword [ebp - 0xa0], edi
test esi, esi
jne 0x4f4913
lea eax, [edi + 1]
cmp ecx, eax
jb 0x4f48db
nop
cmp dword [ebp + eax*4 - 0x54], edi
jne 0x4f48db
inc eax
cmp eax, ecx
jbe 0x4f48d0
mov edx, eax
cmp eax, ecx
ja 0x4f48f6
lea ecx, [ebp - 0x54]
mov esi, dword [ebp + eax*4 - 0x54]
mov dword [ecx], esi
inc eax
add ecx, 4
cmp eax, dword [ebp - 0x10]
jbe 0x4f48e4
mov esi, dword [ebp - 0x54]
mov ebx, dword [ebp - 0xa8]
mov dword [ebx], edi
mov edi, dword [ebp - 0xa0]
sub eax, edx
dec eax
inc edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xa0], edi
jmp 0x4f4919
mov ebx, dword [ebp - 0xa8]
test eax, eax
je 0x4f49f2
cmp eax, 1
jne 0x4f49cb
mov eax, dword [ebp - 0x50]
cmp eax, 1
je 0x4f498a
mov esi, dword [ebp + 0xc]
push esi
call fcn.00506860
sub esi, dword [ebp - 0x54]
add esp, 4
mul esi
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xac], edx
lea ecx, [ebp - 0xb0]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
div dword [ebp + 0xc]
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0xa4]
mov dword [ebx + eax*4], ecx
mov eax, dword [ebp - 0xa0]
inc eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bc40c
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x4f49ab
xor eax, eax
mov dword [ebx + edi*4], eax
mov eax, dword [ebp - 0xa0]
inc eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bc40c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
sub eax, esi
mov dword [ebx + edi*4], eax
mov eax, dword [ebp - 0xa0]
inc eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bc40c
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
cmp esi, 2
jne 0x4f4a05
xor esi, esi
xor edx, edx
xor esi, dword [ebp + edx*4 - 0x54]
inc edx
cmp edx, eax
jbe 0x4f49d7
test esi, esi
jne 0x4f49f2
mov dword [ebx + edi*4], 1
mov edi, dword [ebp - 0xa0]
inc edi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bc40c
mov esp, ebp
pop ebp
ret
push esi
lea eax, [esi - 1]
push eax
lea edx, [ebp - 0x9c]
push 0
push edx
lea ecx, [ebp - 0x54]
call fcn.005074f0
add esp, 0x10
mov eax, dword [ebp - 0x9c]
mov edx, dword [ebp + 0xc]
sub eax, 1
lea edx, [eax + edx]
cmovae edx, eax
mov dword [ebp - 0xa8], edx
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x58]
test eax, eax
jle 0x4f4a5f
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x9c], 0
jne 0x4f4a5f
dec eax
test eax, eax
jg 0x4f4a50
push esi
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x9c]
push edx
mov dword [ebp - 0x58], eax
call fcn.00507760
mov eax, dword [ebp - 0x58]
add esp, 0xc
cmp eax, 1
jb 0x4f4aaf
push esi
lea eax, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0xa0]
push ecx
push 0
push ebx
call fcn.00508450
mov eax, dword [ebp - 0xa0]
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bc40c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
add eax, dword [ebp - 0xa0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc40c
mov esp, ebp
pop ebp
ret