Function at 0x470280
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x10]
sub esp, 0x10
push ebx
push ebp
push esi
push edi
push 1
push eax
mov esi, 4
call fcn.00526760
add esp, 8
test eax, eax
je 0x470568
mov ebp, dword [esp + 0x28]
xor ebx, ebx
cmp ebp, ebx
je 0x470508
mov eax, dword [ebp + 0x960]
cmp eax, ebx
je 0x470508
mov dword [esp + 0x1c], eax
mov eax, dword [eax + 8]
cmp eax, 0xffffffff
je 0x4704ef
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, ebx
je 0x4704ef
mov ecx, dword [0x8294dc]
push ebx
add eax, 0x14
push esi
lea edx, [ecx*4 + 0x8294b4]
push eax
push edx
call fcn.0045cba0
mov eax, dword [0x8294dc]
add esp, 0x10
lea edi, [eax*4 + 0x8294b4]
inc eax
cmp eax, 8
mov dword [esp + 0x18], edi
mov dword [0x8294dc], eax
jl 0x47031d
mov dword [0x8294dc], ebx
push ebx
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x4704e7
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], ebx
sub edx, ecx
cmp edx, eax
jne 0x470365
call fcn.00406630
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x470372
call fcn.00406630
mov ecx, 0x83f450
call fcn.004065e0
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x47039c
mov edx, ecx
or edx, eax
je 0x47039c
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x4704e7
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x4704e7
mov esi, dword [0x829478]
mov dword [0x829468], eax
mov eax, dword [0x8294e8]
mov byte [0x81c6fc], 1
test eax, eax
not esi
mov dword [esp + 0x14], 0
jle 0x47044b
mov dword [esp + 0x10], 0x820e44
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x470425
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x470425
mov edi, dword [eax]
mov ebp, dword [edi + 0xc]
sar ebp, 2
test edi, edi
je 0x470425
xor ebx, ebx
test ecx, ecx
jle 0x470425
mov ecx, edi
call fcn.00406620
xor esi, eax
lea eax, [edi + 0x14]
test ebp, ebp
jle 0x470416
mov ecx, ebp
mov edx, dword [eax]
add eax, 4
xor esi, edx
dec ecx
jne 0x47040c
mov ecx, dword [esp + 0x10]
mov edi, dword [edi + 4]
inc ebx
mov edx, dword [ecx]
cmp ebx, dword [edx + 4]
jl 0x4703fa
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, dword [0x8294e8]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
jl 0x4703d7
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
cmp esi, dword [0x8294d8]
je 0x470458
call fcn.00406630
mov eax, dword [0x8294e8]
xor esi, esi
cmp eax, esi
je 0x4704e0
mov ecx, 0x829464
mov dword [esp + 0x28], esi
call fcn.00406620
test eax, eax
je 0x4704a2
mov ecx, dword [0x829464]
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.00407b70
add esp, 8
test al, al
je 0x47049d
mov eax, dword [esp + 0x28]
cmp eax, esi
je 0x47049d
cmp dword [eax], 0x29874362
je 0x4704a2
call fcn.00406630
mov ecx, 0x8294b0
mov dword [esp + 0x28], esi
call fcn.00406620
test eax, eax
je 0x4704e0
mov eax, dword [0x8294b0]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x4704db
mov eax, dword [esp + 0x28]
cmp eax, esi
je 0x4704db
cmp dword [eax], 0xbad0bad
je 0x4704e0
call fcn.00406630
mov byte [0x81c6fc], 0
test edi, edi
je 0x4704ef
fld dword [edi]
jmp 0x4704f5
fld dword [0x89fe2c]
fild dword [esp + 0x2c]
fxch st(1)
fcompp
fnstsw ax
test ah, 1
jne 0x470572
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x24]
push 2
mov ecx, esi
mov edi, 3
call fcn.006ef6d0
test eax, eax
je 0x47057f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x78]
mov cl, byte [eax + 0x8b0]
test cl, cl
jne 0x47057f
mov cl, byte [eax + 0x778]
test cl, cl
jne 0x47057f
fld dword [esi + 0x6b4]
fmul dword [0x7cf03c]
push ebp
push ecx
mov ecx, dword [esp + 0x38]
fstp dword [esp]
push ecx
mov ecx, eax
call fcn.006ee1a0
xor esi, esi
test ebx, ebx
je 0x470568
mov eax, dword [esp + 0x2c]
mov edx, dword [ebx]
push eax
mov ecx, ebx
call dword [edx + 0x14]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x10
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret