Function at 0x470f60
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x48
call fcn.004fc970
mov eax, dword [0x588eb0]
xor eax, esp
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x4c]
push ebx
push ebp
mov ebp, dword [esp + 0x58]
xor ebx, ebx
cmp ebp, ebx
mov dword [esp + 8], eax
je 0x4712ed
cmp dword [0x58d3b4], ebx
push esi
push edi
je 0x47108a
lea ecx, [esp + 0x18]
push ecx
call fcn.0042bc60
push 0xdf
push 0x560700
push 0x13
push 5
call fcn.0042c050
lea edx, [esp + 0x2c]
push edx
push 0x58cf68
call fcn.0042bca0
mov edi, eax
push 0xe1
neg edi
push 0x560700
sbb edi, edi
push 0x13
add edi, 1
push 6
mov dword [esp + 0x40], edi
call fcn.0042c050
add esp, 0x2c
cmp edi, ebx
jne 0x471004
push 0xe6
push 0x560700
push 0x12
push 9
call fcn.0042c050
add esp, 0x10
mov eax, dword [0x58d3a0]
mov edx, dword [0x58d3a4]
mov ecx, dword [0x58d39c]
mov dword [esp + 0x20], eax
mov eax, dword [0x58d384]
mov dword [esp + 0x24], edx
mov edx, dword [0x58d388]
mov dword [esp + 0x40], eax
mov eax, dword [0x58d38c]
mov esi, ecx
add ecx, ebp
cmp ecx, 0x3ff
mov dword [esp + 0x44], edx
mov edx, dword [0x58d390]
mov dword [esp + 0x48], eax
mov eax, dword [0x58d394]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
mov dword [0x58d39c], ecx
jb 0x471095
mov eax, 0x401005
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 9
imul eax, eax, 0xfffffc01
add ecx, eax
mov dword [0x58d39c], ecx
mov dword [0x58d398], 0x3ff
jmp 0x4710ab
mov dword [esp + 0x14], ebx
mov edi, ebx
jmp 0x470fee
mov eax, dword [0x58d398]
cmp eax, 0x3ff
jae 0x4710ab
cmp ecx, eax
jbe 0x4710ab
mov dword [0x58d398], ecx
mov eax, 0x66666667
imul ebp
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
add ecx, ecx
add ecx, ecx
mov edx, ebp
sub edx, ecx
xor ecx, ecx
test edx, edx
setg cl
add ecx, eax
add dword [0x58d3a4], ecx
cmp edi, ebx
jne 0x4710f0
push 0x106
push 0x560700
push 0x12
push 0xa
call fcn.0042c050
add esp, 0x10
lea edx, [esp + 0x28]
push edx
call fcn.00441f60
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x18], ebx
jle 0x47123d
lea esp, [esp]
cmp ebp, 0x14
mov edi, ebp
jle 0x47111c
mov edi, 0x14
push 0
call fcn.0042fe20
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00441fb0
add esp, 0xc
test eax, eax
je 0x4712de
push 0x14
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00442160
add esp, 0xc
test eax, eax
je 0x4712de
lea ebx, [edi + esi - 0x3ff]
test ebx, ebx
lea ecx, [esi + 0x58cf70]
lea edx, [esp + 0x28]
jle 0x47118e
mov eax, edi
sub eax, ebx
push eax
push ecx
push edx
call fcn.00442160
add esp, 0xc
test eax, eax
je 0x4712de
push ebx
push 0x58cf70
lea eax, [esp + 0x30]
push eax
jmp 0x471191
push edi
push ecx
push edx
call fcn.00442160
add esp, 0xc
test eax, eax
je 0x4712de
mov eax, dword [esp + 0x10]
push edi
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00442160
add esp, 0xc
test eax, eax
je 0x4712de
push 8
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00442160
add esp, 0xc
test eax, eax
je 0x4712de
push 0
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00442170
add esp, 0xc
test eax, eax
je 0x4712de
add dword [esp + 0x24], 1
add dword [esp + 0x10], edi
xor eax, eax
test edi, edi
jle 0x471221
mov cl, byte [esp + eax + 0x40]
xor byte [esi + 0x58cf70], cl
add esi, 1
cmp esi, 0x3ff
jl 0x47121a
xor esi, esi
add eax, 1
cmp eax, edi
jl 0x471203
mov eax, dword [esp + 0x18]
add eax, 0x14
sub ebp, 0x14
cmp eax, dword [esp + 0x60]
mov dword [esp + 0x18], eax
jl 0x471110
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x471257
push 0x13b
push 0x560700
push 0x12
push 9
call fcn.0042c050
add esp, 0x10
xor eax, eax
lea esp, [esp]
movzx edx, byte [esp + eax + 0x40]
xor byte [eax + 0x58d384], dl
movzx ecx, byte [esp + eax + 0x41]
movzx edx, byte [esp + eax + 0x42]
xor byte [eax + 0x58d385], cl
xor byte [eax + 0x58d386], dl
movzx ecx, byte [esp + eax + 0x43]
movzx edx, byte [esp + eax + 0x44]
xor byte [eax + 0x58d387], cl
xor byte [eax + 0x58d388], dl
add eax, 5
cmp eax, 0x14
jl 0x471260
fld qword [0x5606f8]
fld qword [0x58d3a8]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x4712c2
fadd qword [esp + 0x64]
fstp qword [0x58d3a8]
jmp 0x4712c4
fstp st(0)
test edi, edi
jne 0x4712de
push 0x148
push 0x560700
push 0x12
push 0xa
call fcn.0042c050
add esp, 0x10
lea eax, [esp + 0x28]
push eax
call fcn.004421f0
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0x4c]
pop ebp
pop ebx
xor ecx, esp
call fcn.004fbc95
add esp, 0x48
ret