Function at 0x470600
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x14
push ebp
mov ebp, dword [esp + 0x20]
mov eax, 2
test ebp, ebp
mov dword [esp + 8], eax
je 0x4708f6
push ebx
mov ebx, dword [ebp + 0x960]
push esi
push edi
mov eax, dword [ebx + 8]
mov dword [esp + 0x1c], ebx
cmp eax, 0xffffffff
je 0x47086e
push eax
call fcn.0045c0b0
add esp, 4
test eax, eax
je 0x47086e
push 0
add eax, 0x14
push 4
push eax
mov eax, dword [0x8294dc]
lea ecx, [eax*4 + 0x8294b4]
push ecx
call fcn.0045cba0
mov eax, dword [0x8294dc]
add esp, 0x10
lea edi, [eax*4 + 0x8294b4]
inc eax
cmp eax, 8
mov dword [esp + 0x20], edi
mov dword [0x8294dc], eax
jl 0x470685
mov dword [0x8294dc], 0
push 0
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x470866
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], 0
sub edx, ecx
cmp edx, eax
jne 0x4706d2
call fcn.00406630
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x4706df
call fcn.00406630
mov ecx, 0x83f450
call fcn.004065e0
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x470709
mov edx, ecx
or edx, eax
je 0x470709
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x470866
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x470866
mov esi, dword [0x829478]
mov dword [0x829468], eax
mov eax, dword [0x8294e8]
mov byte [0x81c6fc], 1
test eax, eax
not esi
mov dword [esp + 0x18], 0
jle 0x4707c0
mov dword [esp + 0x10], 0x820e44
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x470796
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x470796
mov edi, dword [eax]
mov ebp, dword [edi + 0xc]
sar ebp, 2
test edi, edi
je 0x470796
xor ebx, ebx
test ecx, ecx
jle 0x470796
mov ecx, edi
call fcn.00406620
xor esi, eax
lea eax, [edi + 0x14]
test ebp, ebp
jle 0x470787
mov ecx, ebp
mov edx, dword [eax]
add eax, 4
xor esi, edx
dec ecx
jne 0x47077d
mov ecx, dword [esp + 0x10]
mov edi, dword [edi + 4]
inc ebx
mov edx, dword [ecx]
cmp ebx, dword [edx + 4]
jl 0x47076b
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov ecx, dword [0x8294e8]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
jl 0x470748
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x2c]
cmp esi, dword [0x8294d8]
je 0x4707cd
call fcn.00406630
mov eax, dword [0x8294e8]
test eax, eax
je 0x47085f
mov ecx, 0x829464
mov dword [esp + 0x2c], 0
call fcn.00406620
test eax, eax
je 0x47081d
mov ecx, dword [0x829464]
lea eax, [esp + 0x2c]
push eax
push ecx
call fcn.00407b70
add esp, 8
test al, al
je 0x470818
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x470818
cmp dword [eax], 0x29874362
je 0x47081d
call fcn.00406630
mov ecx, 0x8294b0
mov dword [esp + 0x2c], 0
call fcn.00406620
test eax, eax
je 0x47085f
mov eax, dword [0x8294b0]
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x47085a
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x47085a
cmp dword [eax], 0xbad0bad
je 0x47085f
call fcn.00406630
mov byte [0x81c6fc], 0
test edi, edi
je 0x47086e
fld dword [edi]
jmp 0x470874
fld dword [0x89fe2c]
fild dword [esp + 0x30]
fxch st(1)
fcompp
fnstsw ax
test ah, 1
jne 0x4708ef
mov ecx, dword [esp + 0x28]
push 1
mov dword [esp + 0x18], 3
call fcn.006ef6d0
mov edi, dword [esp + 0x30]
test eax, eax
je 0x4708a8
mov cl, byte [eax + 0x778]
test cl, cl
je 0x4708ac
test edi, edi
jne 0x4708ef
mov ecx, dword [esp + 0x34]
push 1
push ecx
call fcn.00526760
mov esi, eax
add esp, 8
test esi, esi
je 0x4708ef
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x20]
cmp eax, 0x3001
jne 0x4708ef
push esi
mov ecx, ebp
call fcn.006c7410
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x34]
mov edx, dword [ebx]
push edi
mov ecx, ebx
mov dword [esp + 0x18], 0
call dword [edx + 0x14]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x14
ret