Function at 0x41598b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x48
mov eax, dword [0x4b6074]
mov esi, dword [ebp + 0xc]
xor eax, ebp
mov dword [esp + 0x40], eax
xor eax, eax
push eax
push eax
push esi
call fcn.00413ef8
add esp, 0xc
test eax, eax
je 0x4159cd
push 0x701
push 0x4ad7a0
push 0x4afcf4
call fcn.0047b26f
add esp, 0xc
mov ebx, dword [esi]
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x415a69
mov ecx, dword [esi + 4]
pxor xmm1, xmm1
xor eax, eax
xor edx, edx
pxor xmm0, xmm0
mov esi, eax
mov eax, dword [ecx + edx*4]
movd xmm4, dword [ecx + edx*4]
pshufd xmm5, xmm1, 0xee
psrlq xmm1, 0x20
mov edi, eax
and eax, 1
punpcklqdq xmm5, xmm4
shr edi, 1
psllq xmm5, 0x20
or eax, edi
por xmm1, xmm5
neg eax
mov edi, eax
shr edi, 0x1f
neg edi
movd xmm2, edi
mov edi, 0
sbb edi, edi
sar eax, 0x1f
movd xmm3, edi
mov edi, edx
inc edx
punpckldq xmm2, xmm3
movdqa xmm3, xmm1
xor edi, esi
pshufd xmm2, xmm2, 0x44
and eax, edi
pand xmm3, xmm2
pandn xmm2, xmm0
xor eax, esi
cmp ebx, edx
movdqa xmm0, xmm2
por xmm0, xmm3
jne 0x4159ea
shl eax, 5
mov ecx, 0x60
sub ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x415a75
pxor xmm0, xmm0
mov dword [esp + 0x1c], 0x60
mov edx, 4
xor ecx, ecx
xor eax, eax
mov dword [esp + 8], ecx
mov ecx, edx
pshufd xmm1, xmm0, 0xe5
mov dword [esp + 4], edx
mov bl, 0x20
mov esi, 0
movdqa xmm7, xmm0
inc eax
shl eax, cl
mov ecx, 0x40
mov dword [esp + 0x10], eax
sub ecx, eax
movd eax, xmm1
pshufd xmm1, xmm0, 0xe7
mov edx, eax
shr edx, cl
test cl, bl
mov edi, edx
cmovne edi, esi
xor esi, esi
mov dword [esp], edi
movd edi, xmm0
shrd edi, eax, cl
test cl, bl
cmovne edi, edx
movd edx, xmm1
pshufd xmm1, xmm0, 0x4e
mov dword [esp + 0xc], edi
mov edi, edx
mov dword [esp + 0x18], edx
shr edi, cl
test cl, bl
movss xmm5, dword [esp + 0xc]
mov ebx, edi
cmovne ebx, esi
movd esi, xmm1
movss xmm1, dword [esp]
mov eax, esi
shrd eax, edx, cl
mov dl, 0x20
shufps xmm5, xmm0, 0x30
test cl, dl
mov ecx, ebx
mov edx, 0
shufps xmm7, xmm5, 0x84
cmovne eax, edi
mov edi, dword [esp + 0x18]
shr ebx, 1
shufps xmm1, xmm7, 0x20
shld ecx, eax, 0x1f
and eax, 1
shufps xmm7, xmm1, 0x24
or eax, ecx
mov ecx, dword [esp + 0x10]
movaps xmm1, xmm7
neg eax
mov al, 0x20
sbb edx, ebx
mov ebx, dword [esp + 8]
shr edx, 0x1f
shld edi, esi, cl
xor edx, 1
shl esi, cl
test cl, al
mov eax, 0
movd xmm2, ecx
cmovne edi, esi
cmovne esi, eax
mov eax, 0
movd xmm3, edi
movd xmm4, esi
add ecx, ebx
neg edx
mov edi, dword [esp + 4]
sbb eax, eax
punpckldq xmm4, xmm3
movd xmm5, edx
xor ecx, ebx
movd xmm6, eax
punpcklqdq xmm2, xmm4
and ecx, edx
mov eax, ebx
psllq xmm1, xmm2
por xmm2, xmm7
punpckldq xmm5, xmm6
xor ecx, ebx
movsd xmm2, xmm1
pshufd xmm1, xmm5, 0x44
dec edi
xor eax, eax
andpd xmm2, xmm1
pandn xmm1, xmm0
dec eax
mov edx, edi
movdqa xmm0, xmm1
cmp edi, eax
por xmm0, xmm2
jne 0x415a7c
pshufd xmm0, xmm0, 0xe7
mov dword [esp + 0x10], ecx
mov ebx, 0x90d876cd
mov esi, 0
mov edi, 0
movd ecx, xmm0
lea edx, [ebx + 0x2028d09]
mov eax, ecx
mul edx
lea eax, [ebx + 0x6565fb1d]
shr edx, 2
sub eax, edx
sbb esi, esi
mul ecx
lea eax, [ebx + 0x255eab1b]
imul esi, ecx
add esi, edx
shr esi, 2
sub eax, esi
mov esi, 0
sbb esi, esi
mul ecx
lea eax, [ebx + 0xb552941]
imul esi, ecx
add esi, edx
shr esi, 1
sub eax, esi
mov esi, 0
sbb esi, esi
mul ecx
lea eax, [ebx + 0x1a0194eb]
imul esi, ecx
add esi, edx
sub eax, esi
mov esi, 0
sbb esi, esi
mul ecx
imul esi, ecx
add esi, edx
mov edx, esi
shld esi, eax, 1
lea eax, [ebx + 0x66845d36]
shr edx, 0x1f
sub eax, esi
mov esi, 0
sbb esi, edx
mul ecx
imul esi, ecx
add edx, esi
mov esi, edx
shld edx, eax, 1
lea eax, [ebx + 0x5c210374]
shr esi, 0x1f
sub eax, edx
sbb edi, esi
mul ecx
imul edi, ecx
add edx, edi
mov edi, 0
mov esi, edx
shld edx, eax, 1
shr esi, 0x1f
sub ebx, edx
sbb edi, esi
mov eax, ebx
xor esi, esi
xor ebx, ebx
imul edi, ecx
mul ecx
mov ecx, 0x682799a0
add edx, edi
xor edi, edi
shld edx, eax, 6
sub ecx, edx
mov dword [esp + 4], ecx
mov ecx, 4
xor edx, edx
mov dword [esp + 0x14], ecx
mov ch, 0x20
mov dword [esp + 8], esi
mov eax, 0
mov dword [esp + 0x2c], ebx
inc edx
shl edx, cl
mov cl, dl
shl esi, cl
test dl, ch
mov dword [esp], esi
cmovne esi, eax
mov eax, dword [esp + 4]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
shld dword [esp + 4], eax, cl
test dl, ch
mov eax, dword [esp + 4]
cmovne eax, dword [esp]
mov dword [esp], edi
mov edi, ebx
shl edi, cl
test dl, ch
mov ecx, 0
mov dword [esp + 4], eax
mov eax, edi
cmovne eax, ecx
mov ecx, edx
mov dword [esp + 0x28], eax
mov eax, dword [esp]
shld eax, ebx, cl
mov cl, 0x20
mov ebx, dword [esp + 8]
test dl, cl
mov ecx, dword [esp + 0x14]
cmovne eax, edi
mov edi, dword [esp + 0xc]
mov dword [esp + 0x24], eax
mov eax, 0x40
sub eax, edx
mov edx, dword [esp + 0x10]
shr edx, cl
mov ecx, eax
shrd ebx, edi, cl
shr edi, cl
mov cl, 0x20
and edx, 1
test al, cl
mov eax, 0
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x2c]
mov edx, 0
cmovne ebx, edi
cmovne edi, eax
mov eax, dword [esp + 0x18]
or ebx, dword [esp + 0x28]
or edi, dword [esp + 0x24]
xor edi, dword [esp]
xor ebx, ecx
neg eax
sbb edx, edx
and ebx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 8]
xor ebx, ecx
mov ecx, dword [esp + 4]
and edi, edx
xor esi, eax
xor edi, dword [esp]
xor ecx, dword [esp + 0xc]
and esi, dword [esp + 0x18]
and ecx, edx
mov edx, dword [esp + 0x14]
xor esi, eax
xor ecx, dword [esp + 0xc]
dec edx
xor eax, eax
dec eax
mov dword [esp + 4], ecx
mov ecx, edx
cmp edx, eax
jne 0x415ca6
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x20]
add ecx, dword [eax]
mov eax, 0xbf
shl ecx, 5
or ecx, 3
cmp ecx, eax
cmovb eax, ecx
add ecx, 0x1f
sub ecx, eax
and ecx, 0xffffffe0
mov dword [esp + 0x20], ecx
lea ecx, [ecx + 0xe0]
shr ecx, 5
mov dword [esp], ecx
call fcn.0041327b
mov edx, eax
mov eax, dword [esp + 0x1c]
mov ecx, edx
mov dword [esp + 8], edx
add eax, dword [esp + 0x20]
shr eax, 5
mov dword [esp + 0x1c], eax
push eax
push dword [esp + 8]
push esi
call fcn.0041618d
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 8]
add eax, 2
mov edx, ecx
push eax
push edi
push ebx
call fcn.0041618d
add esp, 0xc
mov esi, dword [esp]
mov ecx, esi
call fcn.0041327b
mov edx, dword [esp + 0x20]
mov dword [esp + 0x18], eax
lea ecx, [edx + 0xbf]
add edx, 0xc0
shr edx, 5
mov dword [esp + 0x14], ecx
mov ecx, eax
mov edi, edx
mov edx, eax
push edi
push 0
push 1
call fcn.0041618d
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
add ecx, esi
call fcn.0041327b
mov ecx, dword [eax]
mov ebx, eax
mov edi, esi
cmp esi, ecx
cmova ecx, esi
call fcn.0041327b
add edi, dword [eax]
mov esi, eax
mov ecx, edi
call fcn.0041327b
mov ecx, dword [esp + 8]
mov edi, eax
mov eax, dword [esi]
mov dword [esp], esi
mov dword [esp + 4], ebx
mov edx, dword [edi]
mov ecx, dword [ecx]
cmp ecx, eax
cmova eax, ecx
cmp eax, edx
cmova eax, edx
mov edx, dword [ebp + 0xc]
add eax, eax
mov edx, dword [edx]
cmp ecx, edx
cmova edx, ecx
mov ecx, dword [ebx]
cmp edx, ecx
cmova edx, ecx
lea ecx, [eax + eax*2]
add edx, edx
lea eax, [edx + edx*2]
cmp eax, ecx
cmova ecx, eax
call fcn.0041327b
mov ecx, dword [esp + 0x14]
mov esi, eax
mov eax, dword [edi]
mov dword [esp + 0xc], edi
shr ecx, 5
mov edx, eax
cmp eax, ecx
mov dword [esp + 0x14], ecx
cmovb ecx, eax
sub edx, ecx
cmp edx, eax
cmovae edx, eax
shl ecx, 2
mov eax, dword [ebp + 8]
add ecx, dword [edi + 4]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ecx
mov eax, dword [eax]
shl eax, 5
or eax, 4
cmp eax, 0x15
jb 0x415f70
mov ebx, 0x14
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
push dword [esi + 4]
push dword [esi]
push dword [ebp + 0xc]
call fcn.00413fc2
add esp, 0xc
mov edi, esi
mov esi, dword [esp]
mov edx, dword [esi]
mov ecx, dword [esi + 4]
push 1
xor eax, eax
dec eax
push eax
push eax
push dword [esp + 0x10]
push dword [esp + 0x28]
call fcn.00413ccb
add esp, 0x14
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push dword [edi + 4]
push dword [edi]
push esi
mov esi, edi
call fcn.00413fc2
add esp, 0xc
push 0x1f
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x10]
call fcn.004138a3
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea ebx, [ebx + ebx - 1]
cmp ebx, eax
jb 0x415f00
push dword [esp + 4]
call fcn.00413339
add esp, 4
push dword [esp]
call fcn.00413339
add esp, 4
push dword [esp + 0xc]
call fcn.00413339
add esp, 4
push esi
call fcn.00413339
add esp, 4
mov edi, dword [ebp + 8]
mov esi, dword [esp + 8]
mov ecx, dword [edi]
add ecx, dword [esi]
call fcn.0041327b
mov ebx, eax
push edi
push esi
push eax
call fcn.00413930
add esp, 0xc
mov eax, dword [ebx]
mov edx, dword [esp + 0x14]
lea esi, [esp + 0x30]
mov dword [esp + 0x14], ebx
cmp eax, edx
mov ecx, eax
cmovb edx, eax
sub ecx, edx
cmp ecx, eax
cmovae ecx, eax
shl edx, 2
add edx, dword [ebx + 4]
mov dword [esi], ecx
mov dword [esi + 4], edx
mov ecx, dword [edi]
call fcn.0041327b
mov ebx, eax
push 0x1f
push esi
push eax
call fcn.004138a3
add esp, 0xc
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi]
call fcn.0041327b
mov esi, eax
push edi
mov dword [esp + 0x14], ebx
push ebx
push eax
call fcn.00413930
add esp, 0xc
mov edx, dword [esi]
mov ecx, dword [esi + 4]
push 1
xor eax, eax
dec eax
push eax
push eax
mov dword [esp + 0xc], esi
push esi
push dword [ebp + 8]
call fcn.00413ccb
add esp, 0x14
mov ebx, 2
mov esi, edi
mov dword [esp + 0xc], 0
push esi
mov edi, dword [esp + 4]
push edi
call fcn.00413dd6
add esp, 8
mov dword [esp + 4], eax
and eax, 1
mov edx, dword [edi]
mov ecx, dword [edi + 4]
neg eax
mov esi, eax
and esi, 1
push esi
mov esi, dword [ebp + 0xc]
push eax
push eax
push esi
push edi
call fcn.00413ccb
add esp, 0x14
mov eax, dword [esp + 4]
add dword [esp + 0xc], eax
dec ebx
jne 0x41603b
mov ebx, dword [esp + 0x10]
xor eax, eax
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
push eax
push eax
push eax
push dword [esp + 0x18]
push ebx
call fcn.00413d2f
add esp, 0x14
push esi
push dword [esp + 4]
call fcn.00413dd6
add esp, 8
test eax, eax
je 0x4160ba
push 0x812
push 0x4ad7a0
push 0x4afa6e
call fcn.0047b26f
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
test eax, eax
mov ecx, ebx
je 0x416102
mov ecx, dword [esp + 0x10]
mov ebx, eax
mov eax, dword [eax]
mov esi, dword [ecx]
cmp eax, esi
cmovb esi, eax
lea edi, [esi*4]
push edi
push dword [ecx + 4]
push dword [ebx + 4]
call fcn.00471ae0
add esp, 0xc
mov eax, dword [ebx]
add edi, dword [ebx + 4]
sub eax, esi
shl eax, 2
push eax
push edi
call fcn.00467158
mov ecx, dword [ebp + 0x14]
add esp, 8
mov ebx, dword [esp]
test ecx, ecx
je 0x416141
mov eax, dword [ecx]
mov esi, dword [ebx]
cmp eax, esi
cmovb esi, eax
lea edi, [esi*4]
push edi
push dword [ebx + 4]
push dword [ecx + 4]
mov ebx, ecx
call fcn.00471ae0
add esp, 0xc
mov eax, dword [ebx]
add edi, dword [ebx + 4]
mov ebx, dword [esp]
sub eax, esi
shl eax, 2
push eax
push edi
call fcn.00467158
add esp, 8
push dword [esp + 8]
call fcn.00413339
add esp, 4
push dword [esp + 0x18]
call fcn.00413339
add esp, 4
push dword [esp + 0x14]
call fcn.00413339
add esp, 4
push dword [esp + 0x10]
call fcn.00413339
add esp, 4
push ebx
call fcn.00413339
add esp, 4
mov ecx, dword [esp + 0x40]
xor ecx, ebp
call fcn.0046ef41
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret