Function at 0x474150
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov edx, dword [esi]
mov dword [ebp + 0x10], edx
mov eax, dword [edx + 0xac]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x474563
cmp dword [ecx], 0
jne 0x474563
mov eax, dword [edx + 0xbc]
cmp dword [eax + edi*4], 0
jne 0x474563
mov eax, dword [ecx + 4]
mov dword [ebp - 4], eax
mov edi, dword [ebp - 4]
mov eax, dword [esi + 0xf0]
cmp dword [eax + edi*4], 0
mov edi, dword [ebp + 8]
jne 0x474563
mov eax, dword [edx + 0xd0]
mov edx, dword [ebp - 4]
test byte [eax + edx*4], 0xa0
jne 0x474563
mov eax, dword [esi + 0x18]
movsd xmm0, qword [0x536158]
movsd xmm4, qword [eax + edi*8]
mov eax, dword [esi + 0x1c]
movaps xmm2, xmm4
comisd xmm0, xmm2
movsd xmm1, qword [eax + edi*8]
movsd qword [ebp - 0x18], xmm2
movsd qword [ebp - 0x10], xmm1
jb 0x4741f5
comisd xmm1, xmmword [0x536150]
jae 0x474563
movsd xmm0, qword [ecx + 8]
xorps xmm5, xmm5
comisd xmm0, xmm5
movsd xmm3, qword [0x4fc4a0]
jbe 0x47421b
ucomisd xmm0, qword [0x4fc468]
lahf
test ah, 0x44
jnp 0x474260
jmp 0x47424e
ucomisd xmm0, xmm5
lahf
test ah, 0x44
jnp 0x474563
ucomisd xmm0, qword [0x4fc480]
lahf
test ah, 0x44
jp 0x474248
movaps xmm0, xmm2
movaps xmm2, xmm1
movaps xmm1, xmm0
xorps xmm2, xmm3
xorps xmm1, xmm3
jmp 0x474256
movaps xmm2, xmm1
movaps xmm1, xmm4
divsd xmm1, xmm0
divsd xmm2, xmm0
movsd qword [ebp - 0x18], xmm2
movsd qword [ebp - 0x10], xmm1
mov eax, edx
lea edi, [eax*8]
mov eax, dword [esi + 0x30]
movsd xmm0, qword [eax + edi]
comisd xmm0, xmm2
ja 0x474563
mov ecx, dword [esi + 0x34]
add ecx, edi
comisd xmm1, xmmword [ecx]
ja 0x474563
comisd xmm2, xmm0
jbe 0x474295
movsd qword [eax + edi], xmm2
movsd xmm0, qword [ecx]
comisd xmm0, xmm1
jbe 0x4742a3
movsd qword [ecx], xmm1
mov edx, dword [esi + 0x28]
cmp edx, dword [esi + 0x30]
je 0x4742c3
movsd xmm0, qword [eax + edi]
mov eax, edx
movsd qword [eax + edi], xmm0
mov eax, dword [esi + 0x2c]
movsd xmm0, qword [ecx]
movsd qword [edi + eax], xmm0
mov edi, dword [ebp + 0xc]
mov eax, dword [esi + 0xf0]
mov edx, dword [ebp - 4]
push edi
lea ecx, [edi + 1]
mov dword [eax + edx*4], ecx
mov ecx, edx
mov edx, dword [ebp + 0x10]
lea eax, [edi*4]
mov dword [ebp - 8], eax
inc ecx
push edx
mov eax, dword [edx + 0x1c0]
mov dword [eax + edi*4], ecx
add dword [esi + 0xec], 0xfffffffc
mov eax, dword [esi + 0xec]
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
call fcn.00474680
movsd xmm2, qword [0x536158]
xor ecx, ecx
movsd xmm0, qword [ebp - 0x18]
add esp, 8
comisd xmm0, xmm2
mov dword [ebp + 8], ecx
lea edx, [ecx + 1]
jbe 0x474343
movsd xmm0, qword [ebp - 0x10]
comisd xmm0, xmmword [0x536150]
jb 0x474364
mov eax, dword [esi + 0x18]
comisd xmm2, xmmword [eax + edi*8]
jb 0x474364
mov dword [ebp + 8], edx
jmp 0x474364
movsd xmm1, qword [0x536150]
comisd xmm1, xmmword [ebp - 0x10]
jbe 0x474364
mov eax, dword [esi + 0x1c]
movsd xmm0, qword [eax + edi*8]
comisd xmm0, xmm1
cmovae ecx, edx
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0xac]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x47441a
cmp dword [ecx], 0
jne 0x47441a
mov eax, dword [esi + 0x44]
cmp dword [eax + edi*4], 0
jne 0x47441a
mov eax, dword [ecx + 4]
xorps xmm1, xmm1
movsd xmm3, qword [ecx + 8]
comisd xmm3, xmm1
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x18]
movsd xmm0, qword [eax + edi*8]
mov eax, dword [esi + 0x1c]
jbe 0x4743b4
movsd xmm1, qword [eax + edi*8]
jmp 0x4743bc
movaps xmm1, xmm0
movsd xmm0, qword [eax + edi*8]
divsd xmm0, xmm3
mov edi, dword [ebp - 4]
xor edx, edx
mov eax, dword [esi + 0x30]
divsd xmm1, xmm3
comisd xmm0, xmmword [eax + edi*8]
mov eax, 1
cmovae edx, eax
mov eax, dword [esi + 0x34]
movsd xmm0, qword [eax + edi*8]
comisd xmm0, xmm1
mov edi, dword [ebp + 0xc]
jb 0x4743ed
or edx, 2
test edx, edx
je 0x474417
mov eax, dword [esi + 0xf4]
mov edi, dword [ebp - 4]
mov dword [eax], edi
mov eax, dword [esi + 0xf4]
mov edi, dword [ebp + 0xc]
mov dword [eax + 4], edx
add dword [esi + 0xf4], 8
movsd xmm2, qword [0x536158]
mov edx, dword [ebp + 0x10]
cmp dword [ebp + 8], 0
mov eax, dword [esi + 0x18]
movsd qword [eax + edi*8], xmm2
mov eax, dword [esi + 0x1c]
movsd xmm0, qword [0x536150]
movsd qword [eax + edi*8], xmm0
je 0x474558
movsd xmm1, qword [0x4fc4a0]
test ecx, ecx
je 0x474463
nop dword [eax + eax]
movsd xmm0, qword [ecx + 8]
xorps xmm0, xmm1
movsd qword [ecx + 8], xmm0
mov ecx, dword [ecx]
test ecx, ecx
jne 0x474450
mov edi, dword [edx + 0xbc]
add edi, dword [ebp - 8]
mov esi, dword [edi]
test esi, esi
je 0x474558
mov eax, dword [esi + 4]
shr eax, 9
add eax, 0xfffffffe
cmp eax, 0x92
ja case.0x47448d.4
movzx eax, byte [eax + 0x47457c]
jmp dword [eax*4 + 0x47456c]
movsd xmm0, qword [esi + 0x10]
xorps xmm0, xmm1
movsd qword [esi + 0x10], xmm0
jmp 0x47454c
mov edx, dword [esi + 0x10]
mov ecx, esi
mov dword [edi], edx
mov eax, dword [esi]
mov dword [edx], eax
mov dword [esi], 0
call fcn.004371b0
mov esi, dword [edi]
jmp 0x474544
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx + 4]
and eax, 0xfffffe00
cmp eax, 0x12800
jne 0x4744e4
movsd xmm0, qword [ecx + 0x10]
xorps xmm0, xmm1
movsd qword [ecx + 0x10], xmm0
jmp 0x47454c
mov ecx, dword [esi + 0x14]
mov eax, dword [ecx + 4]
and eax, 0xfffffe00
cmp eax, 0x12800
jne case.0x47448d.4
movsd xmm0, qword [ecx + 0x10]
xorps xmm0, xmm1
movsd qword [ecx + 0x10], xmm0
jmp 0x47454c
push 0x18
call fcn.004371e0
mov ecx, eax
add esp, 4
mov dword [ebp + 8], ecx
test ecx, ecx
je 0x474534
mov eax, dword [esi + 4]
and eax, 0x1fd
mov dword [ecx + 0x10], esi
or eax, 0x2002
mov dword [ecx + 0x14], 0
mov dword [ecx + 4], eax
jmp 0x474536
xor ecx, ecx
mov eax, dword [esi]
mov dword [ecx], eax
mov dword [esi], 0
mov esi, ecx
mov dword [edi], ecx
movsd xmm1, qword [0x4fc4a0]
mov edi, esi
mov esi, dword [esi]
test esi, esi
jne 0x474476
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret