Function at 0x57f9d0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x3554
call fcn.00598f80
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x3550], eax
mov eax, dword [esp + 0x355c]
mov ecx, dword [esp + 0x3560]
push ebx
push ebp
mov ebp, dword [esp + 0x3560]
mov dl, byte [ebp + 0x120c]
inc dword [ebp + 0x120c]
push esi
mov dword [esp + 0x58], eax
xor eax, eax
push edi
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0x11e8]
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov byte [esp + 0x17], al
mov eax, dword [ebp + 0x11f0]
and dl, 3
push ecx
xor esi, esi
mov byte [ebp + 0x12a2], dl
lea edi, [ebp + 0x13ea]
lea ebx, [ebp + eax*4 + 0x1c0c]
lea edx, [ebp + 0x10]
lea eax, [esp + eax*4 + 0x3e0]
push edi
push edx
mov dword [esp + 0x6c], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x38], eax
call fcn.00588120
mov eax, dword [ebp + 0x11e0]
mov edx, dword [ebp + 0x11e8]
lea eax, [eax + eax*4]
lea ecx, [ebx + eax*4]
push ecx
call fcn.005912f0
mov eax, dword [ebp + 0x11e0]
lea edx, [eax + eax*4]
fld dword [ebx + edx*4]
lea eax, [ebx + edx*4]
fld dword [0x6317f8]
add esp, 0x10
fadd st(1), st(0)
fxch st(1)
fstp dword [eax]
mov eax, dword [ebp + 0x11e0]
mov ecx, dword [ebp + 0x11e8]
lea eax, [eax + eax*4]
sar ecx, 3
add eax, ecx
fld dword [ebx + eax*4]
lea eax, [ebx + eax*4]
fadd st(1)
fstp dword [eax]
mov eax, dword [ebp + 0x11e0]
mov edx, dword [ebp + 0x11e8]
lea eax, [eax + eax*4]
lea ecx, [ebx + eax*4]
sar edx, 3
fld dword [ecx + edx*8]
lea eax, [ecx + edx*8]
fsub st(1)
fstp dword [eax]
mov eax, dword [ebp + 0x11e8]
sar eax, 3
lea edx, [eax + eax*2]
mov eax, dword [ebp + 0x11e0]
lea eax, [eax + eax*4]
lea ecx, [ebx + eax*4]
fld dword [ecx + edx*4]
lea eax, [ecx + edx*4]
fsub st(1)
fstp dword [eax]
mov edx, dword [ebp + 0x11e8]
sar edx, 3
shl edx, 4
mov eax, dword [ebp + 0x11e0]
lea eax, [eax + eax*4]
add edx, ebx
fld dword [edx + eax*4]
lea eax, [edx + eax*4]
fadd st(1)
fstp dword [eax]
mov eax, dword [ebp + 0x11e8]
sar eax, 3
add eax, dword [ebp + 0x11e0]
lea ecx, [eax + eax*4]
fld dword [ebx + ecx*4]
lea eax, [ebx + ecx*4]
fadd st(1)
fstp dword [eax]
mov eax, dword [ebp + 0x11e8]
sar eax, 3
lea edx, [eax + eax*2]
mov eax, dword [ebp + 0x11e0]
lea eax, [eax + eax*4]
lea ecx, [ebx + eax*4]
fld dword [ecx + edx*8]
lea eax, [ecx + edx*8]
fsub st(1)
fstp dword [eax]
mov eax, dword [ebp + 0x11e8]
sar eax, 3
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp + 0x11e0]
lea eax, [eax + eax*4]
lea ecx, [ebx + eax*4]
fsubr dword [ecx + edx*4]
lea eax, [ecx + edx*4]
fstp dword [eax]
cmp dword [ebp + 0x1248], esi
jne 0x5802cf
mov edx, dword [ebp + 0x13e4]
push edx
push ebx
lea eax, [esp + 0x3e4]
push eax
lea ecx, [esp + 0xfc]
push ecx
push ebp
call fcn.00587c30
mov edx, dword [esp + 0x40]
push ebx
push edx
lea eax, [esp + 0x10c]
push eax
push ebp
call fcn.00587620
mov edi, dword [esp + 0x3598]
mov ecx, dword [esp + 0x50]
push edi
push ebx
push ecx
lea edx, [esp + 0x120]
push edx
push ebp
call fcn.00586e70
push edi
lea eax, [esp + 0x12c]
push eax
push ebp
call fcn.00586c20
add esp, 0x44
push edi
lea ecx, [esp + 0xf4]
push ecx
push ebp
mov ecx, ebx
call fcn.0057f830
mov edx, dword [ebp + 0x11e4]
lea eax, [ebp + 0x1280]
push edx
push eax
mov dword [esp + 0x24], 0x100
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
call fcn.00586bf0
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x38], eax
or eax, 0xffffffff
mov dword [esp + 0x58], eax
mov dword [esp + 0x48], eax
lea eax, [ebp + 0x94]
push 0x1100
push eax
lea eax, [esp + 0x1f78]
mov ecx, 0xc
lea edi, [esp + 0xdc]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00597e30
movsx ecx, byte [ebp + 0x12a2]
movzx edx, word [ebp + 0x168c]
mov eax, dword [ebp + 0x1688]
add esp, 0x20
mov dword [esp + 0x48], ecx
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x1c], 0
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x24]
cmp eax, esi
jne 0x57fcad
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x20], ecx
jmp 0x57fee3
cmp eax, dword [esp + 0x34]
jne 0x57fcc0
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], ecx
jmp 0x57fedf
cmp dword [esp + 0x1c], 0
jle 0x57fd15
mov edi, dword [esp + 0x18]
push 0x1100
lea edx, [esp + 0x1f60]
push edx
lea eax, [ebp + 0x94]
mov ecx, 0xc
lea esi, [esp + 0xc8]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00597e30
mov al, byte [esp + 0x54]
mov cx, word [esp + 0x60]
mov edx, dword [esp + 0x5c]
add esp, 0xc
mov byte [ebp + 0x12a2], al
mov word [ebp + 0x168c], cx
mov dword [ebp + 0x1688], edx
push ebx
lea eax, [ebp + 0x12a4]
push eax
lea eax, [ebp + 0x94]
push eax
lea eax, [ebp + 0x1280]
push eax
lea eax, [esp + 0x100]
push eax
push ebp
call fcn.00586460
add esp, 0x18
cmp dword [esp + 0x1c], 6
jne 0x57fd5c
cmp dword [esp + 0x28], 0
jne 0x57fd5c
mov esi, dword [esp + 0x18]
mov ecx, 0xc
lea edi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x3574]
mov edx, dword [ebp + 0x1674]
mov eax, dword [esp + 0x18]
push ecx
push 0
push edx
push eax
push ebp
call fcn.00581180
mov ecx, dword [ebp + 0x11e8]
movsx edx, byte [ebp + 0x129e]
mov edi, dword [esp + 0x2c]
push ecx
lea eax, [ebp + 0x12a4]
push eax
movsx eax, byte [ebp + 0x129d]
push edx
push eax
push edi
call fcn.00580d50
bsr ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x14]
sub eax, ecx
dec eax
add esp, 0x28
cmp dword [esp + 0x1c], 6
mov dword [esp + 0x30], ecx
mov dword [esp + 0x20], eax
jne 0x57feaf
cmp dword [esp + 0x28], 0
jne 0x57feaf
cmp eax, dword [esp + 0x3578]
jle 0x57feaf
mov dl, byte [esp + 0x3d8]
mov ecx, 0xc
lea esi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
cmp dword [ebp + 0x11e4], eax
mov byte [ebp + 0x1c00], dl
jle 0x57fe11
lea ecx, [ecx]
mov byte [eax + ebp + 0x1280], 4
inc eax
cmp eax, dword [ebp + 0x11e4]
jl 0x57fe00
mov ecx, dword [esp + 0x3574]
cmp ecx, 2
je 0x57fe23
mov byte [ebp + 0x1280], dl
mov eax, dword [esp + 0x50]
mov dx, word [esp + 0x54]
mov dword [ebp + 0x1688], eax
xor eax, eax
cmp dword [ebp + 0x11e8], eax
mov word [ebp + 0x168c], dx
jle 0x57fe61
jmp 0x57fe50
mov byte [eax + ebp + 0x12a4], 0
inc eax
cmp eax, dword [ebp + 0x11e8]
jl 0x57fe50
mov esi, dword [esp + 0x18]
push ecx
mov ecx, dword [ebp + 0x1674]
push 0
push ecx
push esi
push ebp
call fcn.00581180
mov edx, dword [ebp + 0x11e8]
movsx ecx, byte [ebp + 0x129d]
push edx
lea eax, [ebp + 0x12a4]
push eax
movsx eax, byte [ebp + 0x129e]
push eax
push ecx
push esi
call fcn.00580d50
bsr edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
sub eax, edx
add esp, 0x28
dec eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], eax
cmp dword [esp + 0x357c], 0
jne 0x57fed7
cmp dword [esp + 0x1c], 0
jne 0x57fed7
cmp eax, dword [esp + 0x3578]
jle 0x5802cd
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
jmp 0x57fefd
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x1c], 6
je 0x580267
mov edx, dword [esp + 0x3578]
cmp ecx, edx
jle 0x57fffe
mov edx, dword [esp + 0x28]
test edx, edx
jne 0x57ff4e
cmp dword [esp + 0x1c], 2
jl 0x57ff4e
fld dword [esp + 0x3a4]
fld dword [0x603f40]
fmul st(1), st(0)
fcom st(1)
fnstsw ax
test ah, 5
jp 0x57ff28
fstp st(0)
jmp 0x57ff2a
fstp st(1)
mov esi, dword [esp + 0x10]
fstp dword [esp + 0x3a4]
mov byte [ebp + 0x129e], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x34], 0xffffffff
jmp 0x57ff71
mov esi, dword [esp + 0x10]
movsx edi, si
mov dword [esp + 0x2c], 1
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x34], eax
test edx, edx
jne 0x58007c
xor edi, edi
cmp dword [ebp + 0x11e4], edi
jle 0x58007c
mov eax, dword [ebp + 0x11ec]
xor ecx, ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x4c], eax
nop
xor eax, eax
cmp ecx, dword [esp + 0x4c]
mov dword [esp + 0x24], eax
jge 0x57ffd2
lea esi, [edi + 1]
imul esi, dword [ebp + 0x11ec]
jmp 0x57ffb0
movsx eax, byte [ecx + ebp + 0x12a4]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x24], eax
inc ecx
cmp ecx, esi
jl 0x57ffb0
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x1c], 0
je 0x5800ae
cmp eax, dword [esp + edi*4 + 0x80]
jge 0x57fff1
cmp dword [esp + edi*4 + 0x60], 0
je 0x5800ae
mov dword [esp + edi*4 + 0x60], 1
jmp 0x5800bd
add edx, 0xfffffffb
cmp ecx, edx
jge 0x5802cd
movsx edx, word [esp + 0x10]
mov dword [esp + 0x28], 1
mov dword [esp + 0x40], ecx
mov dword [esp + 0x58], edx
cmp eax, esi
je 0x580078
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
mov esi, eax
mov ecx, 0xc
lea edi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0x18]
push ecx
push edx
lea eax, [esp + 0x306c]
push eax
call fcn.00597e30
push 0x1100
lea eax, [ebp + 0x94]
push eax
lea ecx, [esp + 0xe70]
push ecx
call fcn.00597e30
mov dl, byte [ebp + 0x1c00]
mov ecx, dword [esp + 0x38]
add esp, 0x18
mov byte [esp + 0x17], dl
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
test dword [esp + 0x2c], edx
jne 0x58012b
mov edx, dword [esp + 0x3578]
cmp ecx, edx
jle 0x5800ed
mov eax, 0x4000
cmp si, ax
jge 0x5800e0
lea ecx, [esi + esi]
movzx edx, cx
mov dword [esp + 0x10], edx
jmp 0x580182
mov dword [esp + edi*4 + 0x80], eax
mov word [esp + edi*2 + 0x305c], si
mov eax, dword [ebp + 0x11ec]
add dword [esp + 0x4c], eax
inc edi
add ecx, eax
cmp edi, dword [ebp + 0x11e4]
mov dword [esp + 0x30], ecx
jl 0x57ff90
mov ecx, dword [esp + 0x20]
jmp 0x58007c
mov dword [esp + 0x10], 0x7fff
jmp 0x580182
mov eax, ecx
sub eax, edx
shl eax, 7
cdq
idiv dword [ebp + 0x11e8]
add eax, 0x800
push eax
call fcn.005740d0
mov ecx, eax
and ecx, 0xffff
movsx edx, si
sar eax, 0x10
imul ecx, edx
imul eax, esi
sar ecx, 0x10
add esp, 4
add ecx, eax
movzx eax, cx
mov dword [esp + 0x10], eax
jmp 0x580182
mov esi, dword [esp + 0x58]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x3578]
mov edi, dword [esp + 0x38]
sub eax, edx
sub ecx, esi
imul eax, ecx
sub edi, edx
cdq
idiv edi
sar ecx, 2
lea edx, [ecx + esi]
add eax, esi
movzx eax, ax
mov dword [esp + 0x10], eax
cwde
cmp eax, edx
jle 0x58016d
add ecx, esi
movzx eax, cx
mov dword [esp + 0x10], eax
jmp 0x580182
mov edx, dword [esp + 0x3c]
mov esi, edx
sub esi, ecx
cmp eax, esi
jge 0x580182
sub edx, ecx
movzx ecx, dx
mov dword [esp + 0x10], ecx
mov esi, dword [ebp + 0x11e4]
xor edx, edx
test esi, esi
jle 0x5801f0
mov edi, edi
cmp dword [esp + edx*4 + 0x60], 0
je 0x5801a1
movzx ecx, word [esp + edx*2 + 0x305c]
jmp 0x5801a6
movzx ecx, word [esp + 0x10]
mov eax, dword [esp + edx*4 + 0x3c8]
mov edi, eax
movsx ecx, cx
and edi, 0xffff
sar eax, 0x10
imul edi, ecx
imul eax, ecx
sar edi, 0x10
add eax, edi
cmp eax, 0x7fffff
jle 0x5801d4
mov eax, 0x7fffff
jmp 0x5801e0
cmp eax, 0xff800000
jge 0x5801e0
mov eax, 0xff800000
shl eax, 8
mov dword [esp + edx*4 + 0x70], eax
inc edx
cmp edx, dword [ebp + 0x11e4]
jl 0x580190
mov dl, byte [esp + 0x3d8]
xor ecx, ecx
cmp dword [esp + 0x3574], 2
push esi
sete cl
lea eax, [ebp + 0x1c00]
mov byte [eax], dl
lea edx, [esp + 0x74]
lea edi, [ebp + 0x1280]
push ecx
push eax
push edx
push edi
call fcn.005869d0
mov eax, dword [ebp + 0x11e4]
push eax
push edi
call fcn.00586bf0
mov dword [esp + 0x40], eax
xor eax, eax
add esp, 0x1c
cmp dword [ebp + 0x11e4], eax
jle 0x58025e
mov ecx, dword [ebp + 0x11e4]
fld dword [0x604620]
fild dword [esp + eax*4 + 0x70]
inc eax
cmp eax, ecx
fmul st(1)
fstp dword [esp + eax*4 + 0xec]
jl 0x58024a
fstp st(0)
inc dword [esp + 0x1c]
jmp 0x57fc94
cmp dword [esp + 0x28], 0
je 0x5802cd
cmp eax, esi
je 0x58027b
cmp ecx, dword [esp + 0x3578]
jle 0x5802cd
mov eax, dword [esp + 0x18]
mov edi, eax
mov ecx, 0xc
lea esi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0xa8]
mov eax, dword [eax]
push ecx
lea edx, [esp + 0x3068]
push edx
push eax
call fcn.00597e30
push 0x1100
lea ecx, [esp + 0xe6c]
push ecx
lea eax, [ebp + 0x94]
push eax
call fcn.00597e30
mov dl, byte [esp + 0x2f]
add esp, 0x18
mov byte [ebp + 0x1c00], dl
xor esi, esi
mov eax, dword [ebp + 0x11e0]
mov ecx, dword [ebp + 0x11e8]
lea eax, [eax + eax*4]
add eax, dword [ebp + 0x11f0]
lea edx, [ebp + ecx*4 + 0x1c0c]
add eax, eax
add eax, eax
push eax
push edx
lea eax, [ebp + 0x1c0c]
push eax
call fcn.005985f0
add esp, 0xc
cmp dword [ebp + 0x1248], esi
je 0x580310
mov ecx, dword [esp + 0x5c]
mov dword [ecx], esi
jmp 0x580352
mov edx, dword [ebp + 0x11e4]
mov eax, dword [esp + edx*4 + 0x1d0]
mov cl, byte [ebp + 0x129d]
mov dword [ebp + 0x11c0], eax
mov eax, dword [esp + 0x18]
mov byte [ebp + 0x11bd], cl
mov dword [ebp + 0x1238], esi
bsr edx, dword [eax + 0x1c]
mov eax, dword [eax + 0x14]
mov ecx, dword [esp + 0x5c]
sub eax, edx
add eax, 6
sar eax, 3
mov dword [esp + 0x48], edx
mov dword [ecx], eax
mov ecx, dword [esp + 0x3560]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0059709c
add esp, 0x3554
ret