Function at 0x4580f0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x50
push esi
push edi
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x24], ecx
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x48], eax
mov eax, dword [ecx]
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x20], eax
xor esi, esi
mov eax, dword [ecx + 0x18]
mov edi, dword [ecx + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ecx + 0x20]
mov dword [ebp - 0x44], eax
mov eax, dword [edi + 0x38]
mov edx, dword [ecx + 8]
mov dword [ebp - 8], esi
mov dword [ebp - 0x38], esi
movsx ecx, word [eax + edx*2]
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x30], edx
lea eax, [ecx + eax*8]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x14], eax
cmp dword [ebx + 0x24], esi
je 0x458189
cmp ecx, 2
jne 0x458189
mov edx, eax
lea edi, [ecx*2 - 1]
mov eax, dword [ebp - 0x1c]
sar edx, 1
sub edx, 0x10
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
jmp 0x4581ac
mov edx, eax
lea edi, [ecx*2 - 1]
mov eax, dword [ebp - 0x1c]
sar edx, 1
sub edx, 4
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
cmp dword [ebx + 0x24], esi
je 0x4581ad
mov dword [ebp - 0x10], eax
cmp ecx, 2
jne 0x4581ad
dec edi
mov eax, edi
imul eax, edx
add eax, dword [ebp - 0x10]
cdq
idiv edi
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x14]
add edx, 0xffffffe0
cmp edx, eax
cmovge edx, eax
mov eax, 0x40
cmp edx, eax
cmovg edx, eax
cmp edx, 4
jge 0x4581da
lea edi, [eax - 0x3f]
jmp 0x4581fa
mov eax, edx
mov ecx, 0xe
and edx, 7
sar eax, 3
sub cl, al
movsx edi, word [edx*2 + 0x525098]
sar edi, cl
mov ecx, dword [ebx + 0x10]
inc edi
and edi, 0xfffffffe
mov edx, dword [ebx + 0x24]
mov eax, 1
mov dword [ebp - 0x2c], edi
test edx, edx
je 0x458217
mov esi, dword [ebp - 0x30]
cmp esi, dword [ebp - 0x20]
cmovge edi, eax
xor esi, esi
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 4], 0
je 0x458233
push ecx
push ecx
mov ecx, dword [ebp - 0x28]
push edx
mov edx, dword [ebp - 0x18]
call fcn.0045f050
mov esi, eax
add esp, 0xc
mov dword [ebp - 8], esi
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
bsr edx, eax
mov esi, dword [esi + 0x14]
inc edx
mov dword [ebp - 0x10], eax
lea ecx, [edx - 0x10]
shr eax, cl
mov ecx, eax
shr ecx, 0xc
sub ecx, 8
cmp dword [ecx*4 + 0x524ff0], eax
sbb eax, eax
sub esi, edx
shl esi, 3
neg eax
sub esi, eax
sub esi, ecx
mov dword [ebp - 0x34], esi
mov esi, dword [ebp - 8]
cmp edi, 1
je 0x458635
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x458289
imul esi, edi
add esi, 0x2000
sar esi, 0xe
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x4583b4
cmp dword [ebx + 0x10], 2
jle 0x4583b4
mov eax, edi
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 4], 0
mov dword [ebp - 0x14], eax
lea edx, [eax + 1]
lea edx, [edx + edx*2]
lea ecx, [edx + eax]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 8], ecx
je 0x4582f6
sub edx, eax
cmp esi, eax
jg 0x4582dd
lea eax, [esi + esi*2]
lea edx, [eax + 3]
push ecx
mov ecx, dword [ebp - 0xc]
push edx
mov edx, eax
call fcn.004474a0
add esp, 8
jmp 0x458399
add edx, esi
push ecx
mov ecx, dword [ebp - 0xc]
push edx
lea eax, [edx - 1]
mov edx, eax
call fcn.004474a0
add esp, 8
jmp 0x458399
mov eax, dword [ebp - 0x10]
xor edx, edx
div ecx
xor edx, edx
mov edi, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], edi
mov dword [eax + 0x24], edi
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x20], eax
div edi
mov edx, dword [ebp - 8]
sub edx, eax
dec edx
lea ecx, [eax + 1]
cmp dword [ebp - 8], ecx
sbb ecx, ecx
and ecx, edx
mov edx, dword [ebp - 8]
mov esi, edx
sub esi, ecx
mov ecx, dword [ebp - 0x3c]
sub esi, eax
dec esi
cmp esi, ecx
jge 0x458349
mov eax, 0x55555556
imul esi
mov eax, dword [ebp - 0x14]
mov esi, edx
shr esi, 0x1f
add esi, edx
mov edx, dword [ebp - 8]
jmp 0x458351
mov eax, dword [ebp - 0x14]
sub esi, ecx
inc esi
add esi, eax
sub ecx, eax
cmp esi, eax
jg 0x45835f
lea eax, [esi + esi*2]
lea ecx, [eax + 3]
jmp 0x458364
add ecx, esi
lea eax, [ecx - 1]
sub edx, ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
imul edx, edi
sub dword [ebp - 0x20], edx
cmp dword [ebp - 8], 0
mov edi, dword [ebp - 0x20]
mov dword [eax + 0x20], edi
jbe 0x458387
sub ecx, dword [ebp - 8]
imul ecx, dword [ebp - 0x24]
jmp 0x45838c
mov ecx, dword [ebp - 0x10]
sub ecx, edx
mov dword [eax + 0x1c], ecx
mov ecx, eax
call fcn.0044e460
mov edi, dword [ebp - 0x2c]
shl esi, 0xe
xor edx, edx
mov eax, esi
div edi
cmp dword [ebp - 4], 0
mov dword [ebp - 8], eax
je 0x4587d7
jmp 0x4585de
cmp dword [ebx + 0x1c], 1
jg 0x458577
test eax, eax
jne 0x458577
mov eax, edi
sar eax, 1
mov dword [ebp - 0x24], eax
lea ecx, [eax + 1]
mov edx, ecx
mov dword [ebp - 0x3c], ecx
imul edx, ecx
cmp dword [ebp - 4], 0
mov dword [ebp - 0x20], edx
je 0x458430
cmp esi, eax
jg 0x4583f5
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
lea eax, [esi + 1]
imul eax, esi
sar eax, 1
jmp 0x45840c
mov eax, edi
sub eax, esi
lea ecx, [eax + 1]
mov dword [ebp - 0x14], ecx
lea ecx, [eax + 2]
inc eax
imul ecx, eax
mov eax, edx
sar ecx, 1
sub eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
add eax, dword [ebp - 0x14]
push edx
mov edx, dword [ebp - 0x30]
push eax
call fcn.004474a0
shl esi, 0xe
xor edx, edx
mov eax, esi
add esp, 8
div edi
jmp 0x4587d4
mov esi, dword [ebp - 0x20]
xor edx, edx
mov eax, dword [ebp - 0x10]
mov edi, 1
div esi
xor edx, edx
mov ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], ecx
mov dword [eax + 0x24], ecx
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x28], eax
div ecx
mov edx, esi
sub edx, eax
dec edx
lea ecx, [eax + 1]
cmp esi, ecx
sbb ecx, ecx
and ecx, edx
mov edx, esi
sub edx, ecx
sub edx, eax
mov eax, dword [ebp - 0x24]
imul eax, dword [ebp - 0x3c]
dec edx
sar eax, 1
cmp edx, eax
jge 0x4584cf
lea esi, [edx*8 + 1]
xor eax, eax
bsr ecx, esi
mov dword [ebp - 4], eax
sar ecx, 1
shl edi, cl
jmp 0x458493
mov eax, dword [ebp - 4]
lea edx, [edi + eax*2]
add eax, edi
shl edx, cl
cmp edx, esi
cmova eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov eax, esi
sub eax, edx
shr edi, 1
cmp edx, esi
cmova eax, esi
sub ecx, 1
mov esi, eax
jns 0x458490
mov esi, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
lea esi, [esi - 1]
shr esi, 1
lea eax, [esi + 1]
mov edx, eax
mov dword [ebp - 4], eax
imul edx, esi
sar edx, 1
jmp 0x458538
mov eax, esi
sub eax, edx
lea esi, [eax*8 - 7]
xor eax, eax
bsr ecx, esi
mov dword [ebp - 4], eax
sar ecx, 1
shl edi, cl
jmp 0x4584eb
mov eax, dword [ebp - 4]
lea edx, [edi + eax*2]
add eax, edi
shl edx, cl
cmp edx, esi
cmova eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov eax, esi
sub eax, edx
shr edi, 1
cmp edx, esi
cmova eax, esi
sub ecx, 1
mov esi, eax
jns 0x4584e8
mov edi, dword [ebp - 0x2c]
mov eax, edi
lea esi, [edi*2 + 2]
sub esi, dword [ebp - 4]
shr esi, 1
sub eax, esi
lea ecx, [eax + 1]
add eax, 2
imul eax, ecx
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x20]
mov edx, ecx
sar eax, 1
sub edx, eax
mov eax, dword [ebp - 4]
sub ecx, edx
sub ecx, eax
mov eax, dword [ebp - 0xc]
imul ecx, dword [ebp - 0x14]
sub dword [ebp - 0x28], ecx
mov edi, dword [ebp - 0x28]
mov dword [eax + 0x20], edi
test edx, edx
je 0x458559
mov edx, dword [ebp - 0x14]
imul edx, dword [ebp - 4]
jmp 0x45855e
mov edx, dword [ebp - 0x10]
sub edx, ecx
mov ecx, eax
mov dword [eax + 0x1c], edx
call fcn.0044e460
shl esi, 0xe
xor edx, edx
mov eax, esi
div dword [ebp - 0x2c]
jmp 0x4587d4
test ecx, ecx
je 0x45861e
bsr ecx, edi
mov edx, esi
inc ecx
cmp ecx, 8
jle 0x4585bf
sub ecx, 8
mov eax, edi
shr eax, cl
shr edx, cl
inc eax
push eax
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0xc]
lea eax, [edx + 1]
push eax
call fcn.004474a0
mov ecx, dword [ebp - 0x24]
mov edx, 1
shl edx, cl
dec edx
push ecx
mov ecx, dword [ebp - 0xc]
and edx, esi
call fcn.004475c0
add esp, 0xc
jmp 0x4585d2
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 1]
push eax
lea eax, [esi + 1]
push eax
call fcn.004474a0
add esp, 8
shl esi, 0xe
xor edx, edx
mov eax, esi
div edi
mov dword [ebp - 8], eax
cmp dword [ebx + 0x24], 0
je 0x4587d7
push dword [ebx + 0x10]
test eax, eax
jne 0x45860b
push dword [ebp - 0x30]
mov edx, dword [ebp - 0x28]
push dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
push dword [ebp - 0x18]
call fcn.004573f0
add esp, 0x10
jmp 0x4587d7
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
call fcn.004575f0
add esp, 4
jmp 0x4587d7
mov ecx, dword [ebp - 0xc]
lea edx, [edi + 1]
call fcn.0044e550
shl eax, 0xe
xor edx, edx
div edi
jmp 0x4587d4
cmp dword [ebx + 0x24], 0
je 0x4587d7
mov eax, dword [ebp - 4]
test eax, eax
je 0x458768
xor eax, eax
cmp esi, 0x2000
mov esi, dword [ebx + 0x10]
setg al
mov dword [ebp - 0x38], eax
jle 0x458744
movaps xmm2, xmmword [0x52db30]
xor ecx, ecx
test esi, esi
jle 0x4586e4
cmp esi, 2
jb 0x4586e8
mov edx, dword [ebp - 0x18]
cmp esi, 0x10
jb 0x4586c1
mov edi, esi
lea eax, [edx + 0x20]
and edi, 0xfffffff0
movups xmm0, xmmword [eax - 0x20]
add ecx, 0x10
lea eax, [eax + 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x60], xmm0
movups xmm0, xmmword [eax - 0x50]
xorps xmm0, xmm2
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [eax - 0x30]
xorps xmm0, xmm2
movups xmmword [eax - 0x30], xmm0
cmp ecx, edi
jl 0x458683
mov eax, esi
and al, 0xf
cmp al, 2
jb 0x4586e4
mov eax, esi
and eax, 0xfffffffe
nop word [eax + eax]
movsd xmm0, qword [edx + ecx*4]
xorps xmm0, xmm2
movsd qword [edx + ecx*4], xmm0
add ecx, 2
cmp ecx, eax
jl 0x4586d0
cmp ecx, esi
jge 0x458744
mov edx, dword [ebp - 0x18]
mov eax, esi
sub eax, ecx
cmp eax, 4
jl 0x458730
mov edi, esi
lea eax, [edx + 8]
sub edi, ecx
lea eax, [eax + ecx*4]
sub edi, 4
shr edi, 2
inc edi
lea ecx, [ecx + edi*4]
nop dword [eax + eax]
lea eax, [eax + 0x10]
movups xmm0, xmmword [eax - 0x18]
xorps xmm0, xmm2
movups xmmword [eax - 0x18], xmm0
sub edi, 1
jne 0x458710
cmp ecx, esi
jge 0x458747
nop word [eax + eax]
movss xmm0, dword [edx + ecx*4]
xorps xmm0, xmm2
movss dword [edx + ecx*4], xmm0
inc ecx
cmp ecx, esi
jl 0x458730
jmp 0x458747
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x40]
push esi
push dword [ebp - 0x30]
push dword [ebp - 0x44]
push edx
mov edx, dword [ebp - 0x28]
call fcn.004573f0
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov eax, dword [ebp - 4]
mov edx, dword [ecx + 0x1c]
jmp 0x45876e
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
cmp dword [esi], 0x10
jle 0x4587cb
mov esi, dword [ebp - 0x24]
cmp dword [esi + 0x1c], 0x10
jle 0x4587cb
mov esi, edx
shr esi, 2
test eax, eax
je 0x4587a3
mov edi, dword [ebp - 0x38]
sub edx, esi
test edi, edi
je 0x458796
add dword [ecx + 0x20], edx
test edi, edi
cmovne edx, esi
mov dword [ecx + 0x1c], edx
call fcn.00447460
jmp 0x4587d2
mov edi, dword [ecx + 0x20]
cmp edi, esi
sbb eax, eax
neg eax
mov dword [ebp - 0x38], eax
cmp edi, esi
jb 0x4587ba
mov eax, edi
sub eax, esi
mov dword [ecx + 0x20], eax
sub edx, esi
cmp edi, esi
cmovae esi, edx
mov dword [ecx + 0x1c], esi
call fcn.0044e460
jmp 0x4587d2
mov dword [ebp - 0x38], 0
xor eax, eax
mov dword [ebp - 8], eax
mov edi, dword [ebp - 0xc]
mov edx, dword [edi + 0x1c]
bsr esi, edx
inc esi
lea ecx, [esi - 0x10]
shr edx, cl
mov ecx, edx
shr ecx, 0xc
sub ecx, 8
cmp dword [ecx*4 + 0x524ff0], edx
mov edx, dword [edi + 0x14]
sbb eax, eax
sub edx, esi
neg eax
shl edx, 3
sub edx, eax
mov eax, dword [ebp - 0x1c]
sub edx, ecx
sub edx, dword [ebp - 0x34]
mov dword [ebp - 0x40], edx
sub dword [eax], edx
mov eax, dword [ebp - 8]
test eax, eax
jne 0x45883a
mov ecx, dword [ebx + 0x18]
mov esi, 1
shl esi, cl
xor edi, edi
mov ecx, dword [ebp - 0x48]
dec esi
mov dword [ebp - 0x1c], 0x7fff
and dword [ecx], esi
mov ecx, 0xffffc000
jmp 0x4589b6
cmp eax, 0x4000
jne 0x458866
mov ecx, dword [ebx + 0x18]
mov esi, 1
shl esi, cl
mov edi, 0x7fff
dec esi
mov dword [ebp - 0x1c], 0
shl esi, cl
mov ecx, dword [ebp - 0x48]
and dword [ecx], esi
mov ecx, eax
jmp 0x4589b6
movzx edi, ax
mov ecx, 0x4000
movsx eax, di
imul eax, eax
add eax, 0x1000
sar eax, 0xd
movzx esi, ax
movsx edx, si
imul eax, edx, 0x272
sub ecx, eax
sar ecx, 0xf
add ecx, 0x2055
movsx eax, cx
mov ecx, 0x4000
imul eax, edx
add eax, 0x4000
sar eax, 0xf
sub eax, 0x1de3
cwde
imul eax, edx
add eax, 0x4000
sar eax, 0xf
sub eax, esi
add eax, 0xffff8000
mov dword [ebp - 0x34], eax
cwde
mov dword [ebp - 0x1c], eax
mov eax, ecx
sub eax, edi
cwde
imul eax, eax
add eax, 0x1000
sar eax, 0xd
movzx esi, ax
movsx edx, si
imul eax, edx, 0x272
sub ecx, eax
sar ecx, 0xf
add ecx, 0x2055
movsx eax, cx
imul eax, edx
add eax, 0x4000
sar eax, 0xf
sub eax, 0x1de3
cwde
imul edx, eax
mov eax, dword [ebp - 0x1c]
add edx, 0x4000
sar edx, 0xf
sub edx, esi
add edx, 0xffff8000
movsx ecx, dx
bsr edi, ecx
bsr esi, eax
mov dword [ebp - 0x3c], ecx
mov eax, 0xf
inc esi
mov ecx, eax
sub ecx, esi
mov dword [ebp - 0x24], esi
mov esi, dword [ebp - 0x34]
inc edi
shl si, cl
sub eax, edi
mov ecx, eax
movsx esi, si
shl dx, cl
mov ecx, 0x4000
movsx edx, dx
imul eax, edx, 0xa25
sub ecx, eax
imul eax, esi, 0xa25
sar ecx, 0xf
add ecx, 0x1efc
movsx ecx, cx
imul ecx, edx
mov edx, 0x4000
sub edx, eax
add ecx, 0x4000
sar ecx, 0xf
sar edx, 0xf
sub edi, dword [ebp - 0x24]
add edx, 0x1efc
movsx eax, dx
imul eax, esi
shl edi, 0xb
add eax, 0x4000
sar eax, 0xf
sub ecx, eax
mov eax, dword [ebx + 0x10]
shl eax, 7
add ecx, edi
mov edi, dword [ebp - 0x3c]
add eax, 0xffffff80
movsx ecx, cx
cwde
imul ecx, eax
mov eax, dword [ebp - 8]
add ecx, 0x4000
sar ecx, 0xf
mov edx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x38]
mov dword [edx], esi
mov esi, dword [ebp - 0x1c]
mov dword [edx + 4], esi
mov esi, edx
mov edx, dword [ebp - 0x40]
mov dword [esi + 8], edi
pop edi
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret