Function at 0x521ae0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebx + 8]
push esi
push edi
push 0
push 0x623610
push 0x6235d8
push 0
push eax
mov dword [ebp - 4], ecx
mov byte [eax + 4], 1
call fcn.0059e522
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x30], edi
test edi, edi
je 0x522a8f
mov esi, dword [edi + 0x44]
mov dword [ebp - 0x10], esi
test esi, esi
jne 0x5223c0
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0x7c]
call eax
mov esi, dword [ebx + 0x14]
mov edx, dword [ebx + 8]
mov ecx, dword [esi + 4]
imul ecx, dword [edx + 0x20]
add ecx, dword [esi]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ecx]
mov eax, dword [eax + 0x7c]
call eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x20]
imul ecx, dword [ebx + 0x10]
add ecx, dword [ebx + 0xc]
cmp byte [edx + 0x4e], 0
lea eax, [eax + ecx*4]
mov dword [ebp - 8], eax
jne 0x521f68
cmp byte [edx + 0x4d], 0
jne 0x521f68
push 0x6671bc
push dword [ebx + 0x18]
call fcn.00500430
add esp, 8
test al, al
jne 0x521f68
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0x48]
call eax
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x30], 0
mov edx, dword [ecx + 0x20]
imul edx, dword [esi + 4]
add edx, dword [esi]
add edx, eax
cmp dword [esi + 0xc], 0
mov dword [ebp - 0x2c], edx
jle 0x522a87
mov ecx, dword [ebp - 0xc]
nop dword [eax]
mov eax, dword [ebp - 8]
mov edi, ecx
mov ecx, dword [esi + 8]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], ecx
test ecx, ecx
jle 0x521f1f
mov cl, byte [edx]
mov esi, dword [edi]
movzx edx, cl
cmp edx, dword [ebp - 0x18]
movzx ecx, cl
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x34]
movzx ecx, cl
cmova edx, ecx
mov dword [ebp - 0x24], esi
shr esi, 0x18
mov ecx, 0x100
sub ecx, esi
movzx edx, dl
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x14], edx
cmp ecx, 1
jne 0x521c44
test edx, edx
je 0x521f06
mov esi, edx
mov ecx, dword [edi]
add edi, 4
mov dword [eax], ecx
add eax, 4
sub esi, 1
jne 0x521c30
jmp 0x521f06
cmp ecx, 0x100
jne 0x521c5c
lea ecx, [edx*4]
add eax, ecx
add edi, ecx
jmp 0x521f06
mov edx, dword [eax]
add edi, 4
mov esi, edx
and edx, 0xff00
imul edx, dword [ebp - 0x34]
and esi, 0xff00ff
imul esi, ecx
mov ecx, dword [ebp - 0x24]
and ecx, 0xff00ff
imul ecx, dword [ebp - 0x20]
shr edx, 8
shr esi, 8
shr ecx, 8
add esi, ecx
mov ecx, dword [ebp - 0x24]
and ecx, 0xff00
and esi, 0xffff00ff
imul ecx, dword [ebp - 0x20]
shr ecx, 8
add edx, ecx
and edx, 0xff00
or esi, edx
mov edx, dword [ebp - 0x14]
or esi, 0xff000000
mov dword [eax], esi
add eax, 4
mov esi, 1
mov dword [ebp - 0x10], esi
lea ecx, [edx - 1]
mov dword [ebp - 0x24], ecx
cmp edx, esi
jbe 0x521e71
cmp ecx, 8
jb 0x521e71
cmp dword [0x6690bc], 2
jl 0x521e71
lea edx, [eax + ecx*4]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x34], edx
lea edx, [edi + ecx*4]
mov ecx, dword [ebp - 0x28]
add ecx, 8
cmp ecx, edx
ja 0x521d0d
mov ecx, dword [ebp - 0x38]
add ecx, 8
cmp dword [ebp - 0x34], ecx
jae 0x521e6e
mov ecx, dword [ebp - 0x24]
and ecx, 0x80000007
jns 0x521d1d
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, dword [ebp - 0x14]
movaps xmm7, xmmword [0x5e66b0]
mov dword [ebp - 0x10], edx
sub dword [ebp - 0x10], ecx
mov ecx, 0x18
movd xmm1, ecx
mov ecx, 8
movaps xmmword [ebp - 0x50], xmm1
movd xmm6, ecx
mov ecx, dword [ebp - 0x10]
nop word [eax + eax]
movups xmm5, xmmword [edi]
add esi, 8
movaps xmm2, xmmword [0x5e6690]
movaps xmm3, xmm7
movaps xmm4, xmm5
movaps xmm0, xmm5
pand xmm5, xmmword [0x5e6700]
pand xmm0, xmm7
psrld xmm4, xmm1
movups xmm1, xmmword [eax]
pmulld xmm0, xmm4
pand xmm3, xmm1
psubd xmm2, xmm4
pmulld xmm3, xmm2
psrld xmm0, xmm6
psrld xmm3, xmm6
pmulld xmm5, xmm4
paddd xmm3, xmm0
movaps xmm0, xmmword [0x5e6700]
pand xmm0, xmm1
pand xmm3, xmm7
pmulld xmm0, xmm2
movaps xmm2, xmmword [0x5e6690]
psrld xmm0, xmm6
psrld xmm5, xmm6
paddd xmm0, xmm5
pand xmm0, xmmword [0x5e67b0]
movups xmm5, xmmword [edi + 0x10]
add edi, 0x20
por xmm3, xmm0
por xmm3, xmmword [0x5e6780]
movaps xmm4, xmm5
psrld xmm4, xmmword [ebp - 0x50]
movups xmmword [eax], xmm3
movups xmm1, xmmword [eax + 0x10]
movaps xmm0, xmm5
movaps xmm3, xmm7
pand xmm5, xmmword [0x5e6700]
pand xmm0, xmm7
pand xmm3, xmm1
psubd xmm2, xmm4
pmulld xmm0, xmm4
pmulld xmm3, xmm2
psrld xmm0, xmm6
psrld xmm3, xmm6
pmulld xmm5, xmm4
paddd xmm3, xmm0
movaps xmm0, xmmword [0x5e6700]
pand xmm0, xmm1
pand xmm3, xmm7
movaps xmm1, xmmword [ebp - 0x50]
pmulld xmm0, xmm2
psrld xmm0, xmm6
psrld xmm5, xmm6
paddd xmm0, xmm5
pand xmm0, xmmword [0x5e67b0]
por xmm3, xmm0
por xmm3, xmmword [0x5e6780]
movups xmmword [eax + 0x10], xmm3
add eax, 0x20
cmp esi, ecx
jl 0x521d50
mov dword [ebp - 0x10], esi
jmp 0x521e71
mov edx, dword [ebp - 0x14]
cmp esi, edx
jge 0x521f06
nop dword [eax]
mov ecx, dword [edi]
mov edx, 0x100
mov esi, dword [eax]
add edi, 4
mov dword [ebp - 0x24], ecx
shr ecx, 0x18
sub edx, ecx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x28], edi
and ecx, 0xff00ff
imul ecx, dword [ebp - 0x20]
mov edi, esi
and edi, 0xff00ff
and esi, 0xff00
imul edi, edx
imul esi, edx
mov edx, dword [ebp - 0x14]
shr ecx, 8
shr edi, 8
add edi, ecx
shr esi, 8
mov ecx, dword [ebp - 0x24]
and edi, 0xffff00ff
and ecx, 0xff00
imul ecx, dword [ebp - 0x20]
shr ecx, 8
add esi, ecx
mov ecx, dword [ebp - 0x10]
and esi, 0xff00
inc ecx
or edi, esi
mov dword [ebp - 0x10], ecx
or edi, 0xff000000
mov dword [eax], edi
add eax, 4
mov edi, dword [ebp - 0x28]
cmp ecx, edx
jl 0x521e80
mov ecx, dword [ebp - 0x18]
add dword [ebp - 0x1c], edx
sub ecx, edx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
test ecx, ecx
jg 0x521be6
mov esi, dword [ebx + 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x2c]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebx + 8]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x20]
add edx, eax
mov dword [ebp - 0x2c], edx
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x30], eax
cmp eax, dword [esi + 0xc]
jl 0x521bd0
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14
push 0x6671bc
push dword [ebx + 0x18]
call fcn.00500400
add esp, 8
test al, al
je 0x5220b4
xor ecx, ecx
mov dword [ebp - 0x24], ecx
cmp dword [esi + 0xc], ecx
jle 0x522a87
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
xor edi, edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], edi
cmp dword [esi + 8], edi
jle 0x522076
mov ecx, dword [edx]
add edx, 4
mov eax, dword [eax]
mov dword [ebp - 0x34], edx
mov edx, ecx
shr edx, 0x18
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], edx
test edx, edx
je 0x52205a
mov esi, eax
mov ecx, 0xff
shr esi, 0x18
mov eax, 0x80808081
sub ecx, esi
imul ecx, edx
imul ecx
imul eax, dword [ebp - 0x38], 0xff
add edx, ecx
mov ecx, dword [ebp - 0x2c]
sar edx, 7
and ecx, 0xff00ff
mov edi, edx
shr edi, 0x1f
add edi, edx
cdq
add edi, esi
mov esi, dword [ebp - 0x30]
idiv edi
and esi, 0xff00ff
shl edi, 0x18
imul ecx, eax
mov edx, 0x100
sub edx, eax
imul esi, edx
shr ecx, 8
shr esi, 8
add esi, ecx
mov ecx, dword [ebp - 0x30]
and ecx, 0xff00
and esi, 0xff00ff
imul ecx, edx
mov edx, dword [ebp - 0x2c]
and edx, 0xff00
imul edx, eax
mov eax, dword [ebp - 0x1c]
shr ecx, 8
shr edx, 8
add ecx, edx
and ecx, 0xff00
or esi, ecx
or esi, edi
mov edi, dword [ebp - 0x28]
mov dword [eax], esi
mov esi, dword [ebx + 0x14]
jmp 0x52205d
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x34]
inc edi
add eax, 4
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], eax
cmp edi, dword [esi + 8]
jl 0x521fa5
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
inc ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + 0x20]
lea edx, [edx + eax*4]
mov eax, dword [ebx + 8]
mov dword [ebp - 8], edx
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + 0x20]
lea edx, [edx + eax*4]
mov dword [ebp - 0xc], edx
cmp ecx, dword [esi + 0xc]
jl 0x521f91
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14
mov ecx, dword [ebx + 0x18]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov edi, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], ecx
cmp eax, edx
jne 0x52223f
cmp edx, ecx
jne 0x52223f
cmp dword [esi + 0xc], 0
mov dword [ebp - 0x24], 0
jle 0x522a87
nop
cmp dword [esi + 8], 0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x28], 0
jle 0x5221fe
nop word [eax + eax]
mov eax, dword [edx]
add edx, 4
mov edi, dword [ecx]
mov ecx, eax
shr ecx, 0x18
imul ecx, dword [ebp - 0x10]
mov dword [ebp - 0x30], eax
mov eax, 0x80808081
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x2c], edi
mul ecx
mov eax, edx
shr eax, 7
mov dword [ebp - 0x38], eax
test eax, eax
je 0x5221e2
mov esi, edi
mov ecx, 0xff
shr esi, 0x18
sub ecx, esi
imul ecx, eax
mov eax, 0x80808081
imul ecx
imul eax, dword [ebp - 0x38], 0xff
add edx, ecx
sar edx, 7
mov edi, edx
shr edi, 0x1f
add edi, edx
cdq
add edi, esi
mov esi, dword [ebp - 0x30]
idiv edi
and esi, 0xff00ff
shl edi, 0x18
imul esi, dword [ebp - 0x14]
mov ecx, eax
mov eax, dword [ebp - 0x2c]
mov edx, 0x100
and eax, 0xff00ff
sub edx, ecx
imul eax, edx
shr esi, 8
and esi, 0xff00ff
imul esi, ecx
shr eax, 8
shr esi, 8
add esi, eax
mov eax, dword [ebp - 0x30]
and eax, 0xff00
and esi, 0xff00ff
imul eax, ecx
mov ecx, dword [ebp - 0x2c]
and ecx, 0xff00
imul ecx, edx
imul eax, dword [ebp - 0x14]
shr ecx, 8
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x1c]
and eax, 0xff00
or esi, eax
or esi, edi
mov dword [ecx], esi
mov esi, dword [ebx + 0x14]
jmp 0x5221e5
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x28]
add ecx, 4
mov edx, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], ecx
cmp eax, dword [esi + 8]
jl 0x522110
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebx + 8]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x24], eax
cmp eax, dword [esi + 0xc]
jl 0x5220f0
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14
cmp dword [esi + 0xc], 0
mov dword [ebp - 0x28], 0
jle 0x522a87
cmp dword [esi + 8], 0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x2c], 0
jle 0x52237f
nop word [eax + eax]
mov eax, dword [edx]
add edx, 4
mov ecx, dword [ecx]
mov dword [ebp - 0x18], ecx
mov ecx, eax
shr ecx, 0x18
imul ecx, edi
mov dword [ebp - 0x30], eax
mov eax, 0x80808081
mov dword [ebp - 0x20], edx
mul ecx
mov edi, edx
shr edi, 7
test edi, edi
je 0x522360
mov esi, dword [ebp - 0x18]
mov ecx, 0xff
shr esi, 0x18
mov eax, 0x80808081
sub ecx, esi
imul ecx, edi
imul ecx
imul eax, edi, 0xff
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cdq
add ecx, esi
mov esi, 0x100
idiv ecx
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x30]
mov edx, eax
mov eax, dword [ebp - 0x18]
mov edi, ecx
and edi, 0xff0000
movzx ecx, cl
and eax, 0xff0000
imul edi, edx
sub esi, edx
imul ecx, edx
imul eax, esi
shr edi, 8
imul edi, dword [ebp - 0x14]
imul ecx, dword [ebp - 0x38]
shr eax, 8
shr edi, 8
add edi, eax
shr ecx, 0x10
mov eax, dword [ebp - 0x18]
and edi, 0xff0000
movzx eax, al
imul eax, esi
shr eax, 8
add ecx, eax
movzx eax, cl
mov ecx, dword [ebp - 0x18]
or edi, eax
mov eax, dword [ebp - 0x30]
and ecx, 0xff00
and eax, 0xff00
imul ecx, esi
mov esi, dword [ebx + 0x14]
imul eax, edx
shr ecx, 8
imul eax, dword [ebp - 0x34]
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x1c]
and eax, 0xff00
or edi, eax
mov eax, dword [ebp - 0x24]
shl eax, 0x18
or edi, eax
mov dword [ecx], edi
jmp 0x522363
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
add ecx, 4
mov edx, dword [ebp - 0x20]
inc eax
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x1c], ecx
cmp eax, dword [esi + 8]
jl 0x522270
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebx + 8]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x28], eax
cmp eax, dword [esi + 0xc]
jl 0x522250
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14
mov edi, dword [ebx + 0x14]
mov ecx, dword [ebx + 8]
mov eax, dword [edi + 4]
imul eax, dword [ecx + 0x20]
mov ecx, dword [ebp - 0x30]
add eax, dword [ecx + 0x48]
add eax, dword [edi]
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], eax
mov eax, dword [ecx]
mov eax, dword [eax + 0x7c]
call eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x20]
imul ecx, dword [ebx + 0x10]
add ecx, dword [ebx + 0xc]
cmp byte [edx + 0x4e], 0
lea eax, [eax + ecx*4]
mov dword [ebp - 0xc], eax
jne 0x522632
cmp byte [edx + 0x4d], 0
jne 0x522632
push 0x6671bc
push dword [ebx + 0x18]
call fcn.00500430
add esp, 8
test al, al
jne 0x522632
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx]
mov eax, dword [eax + 0x48]
call eax
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x34], 0
mov ecx, dword [ecx + 0x20]
imul ecx, dword [edi + 4]
add ecx, dword [edi]
add ecx, eax
cmp dword [edi + 0xc], 0
mov dword [ebp - 0x24], ecx
jle 0x522a87
mov ecx, dword [ebp - 8]
mov eax, edi
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov esi, edx
mov edx, dword [ebp - 0x24]
mov edi, ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x18], eax
test eax, eax
jle 0x5225ef
nop dword [eax]
mov ecx, dword [ebp - 0x10]
movzx eax, byte [edi]
mov eax, dword [ecx + eax*4]
movzx ecx, byte [edx]
cmp ecx, dword [ebp - 0x18]
movzx edx, byte [edx]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x18]
movzx eax, al
cmova edx, eax
mov eax, dword [ebp - 0x30]
mov ecx, eax
shr ecx, 0x18
mov dword [ebp - 0x14], ecx
mov ecx, 0x100
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], ecx
movzx ecx, dl
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
cmp edx, 1
jne 0x5224d6
test ecx, ecx
je 0x5225d4
mov edx, dword [ebp - 0x10]
nop dword [eax]
movzx eax, byte [edi]
inc edi
mov eax, dword [edx + eax*4]
mov dword [esi], eax
add esi, 4
sub ecx, 1
jne 0x5224c0
jmp 0x5225d1
cmp edx, 0x100
jne 0x5224e8
lea esi, [esi + ecx*4]
add edi, ecx
jmp 0x5225d4
mov ecx, dword [esi]
and eax, 0xff00ff
imul eax, dword [ebp - 0x14]
mov edx, ecx
and edx, 0xff00ff
and ecx, 0xff00
imul edx, dword [ebp - 0x1c]
inc edi
imul ecx, dword [ebp - 0x1c]
shr eax, 8
shr edx, 8
add edx, eax
shr ecx, 8
mov eax, dword [ebp - 0x30]
and edx, 0xffff00ff
and eax, 0xff00
imul eax, dword [ebp - 0x14]
shr eax, 8
add ecx, eax
and ecx, 0xff00
or edx, ecx
mov ecx, dword [ebp - 0x20]
or edx, 0xff000000
mov dword [esi], edx
add esi, 4
mov dword [ebp - 0x1c], esi
cmp ecx, 1
jbe 0x5225d4
dec ecx
mov dword [ebp - 0x30], ecx
movzx eax, byte [edi]
inc edi
mov edx, dword [esi]
mov esi, edx
mov ecx, dword [ebp - 0x10]
and esi, 0xff00ff
mov dword [ebp - 0x2c], edi
and edx, 0xff00
mov eax, dword [ecx + eax*4]
mov edi, eax
mov dword [ebp - 0x38], eax
mov ecx, 0x100
and eax, 0xff00ff
shr edi, 0x18
imul eax, edi
sub ecx, edi
imul esi, ecx
imul edx, ecx
shr eax, 8
shr esi, 8
add esi, eax
shr edx, 8
mov eax, dword [ebp - 0x38]
and esi, 0xffff00ff
and eax, 0xff00
imul eax, edi
mov edi, dword [ebp - 0x2c]
shr eax, 8
add edx, eax
mov eax, dword [ebp - 0x1c]
and edx, 0xff00
or esi, edx
or esi, 0xff000000
mov dword [eax], esi
mov esi, eax
add esi, 4
sub dword [ebp - 0x30], 1
mov dword [ebp - 0x1c], esi
jne 0x522552
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
sub eax, ecx
add edx, ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], edx
test eax, eax
jg 0x522470
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x34]
inc esi
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x34], esi
lea edx, [edx + eax*4]
mov eax, dword [ebx + 8]
mov dword [ebp - 0xc], edx
mov eax, dword [eax + 0x20]
add ecx, eax
add dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 8], ecx
cmp esi, dword [eax + 0xc]
jl 0x522455
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14
push 0x6671bc
push dword [ebx + 0x18]
call fcn.00500400
add esp, 8
test al, al
je 0x522790
cmp dword [edi + 0xc], 0
mov dword [ebp - 0x28], 0
jle 0x522a87
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cmp dword [edi + 8], 0
mov edx, ecx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x2c], 0
jle 0x522755
nop word [eax + eax]
movzx eax, byte [eax]
inc dword [ebp - 0x20]
mov ecx, dword [esi + eax*4]
mov eax, dword [edx]
mov edx, ecx
shr edx, 0x18
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], edx
test edx, edx
je 0x522736
mov esi, eax
mov ecx, 0xff
shr esi, 0x18
mov eax, 0x80808081
sub ecx, esi
imul ecx, edx
imul ecx
imul eax, dword [ebp - 0x38], 0xff
add edx, ecx
mov ecx, dword [ebp - 0x30]
sar edx, 7
and ecx, 0xff00
mov edi, edx
shr edi, 0x1f
add edi, edx
cdq
add edi, esi
mov esi, dword [ebp - 0x34]
idiv edi
and esi, 0xff00
shl edi, 0x18
imul ecx, eax
mov edx, 0x100
sub edx, eax
imul esi, edx
shr ecx, 8
shr esi, 8
add esi, ecx
mov ecx, dword [ebp - 0x34]
and ecx, 0xff00ff
and esi, 0xff00
imul ecx, edx
mov edx, dword [ebp - 0x30]
and edx, 0xff00ff
imul edx, eax
shr ecx, 8
shr edx, 8
add ecx, edx
mov edx, dword [ebp - 0x24]
and ecx, 0xff00ff
or esi, ecx
or esi, edi
mov edi, dword [ebx + 0x14]
mov dword [edx], esi
mov esi, dword [ebp - 0x10]
jmp 0x522739
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
add edx, 4
inc eax
mov dword [ebp - 0x24], edx
cmp eax, dword [edi + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x20]
jl 0x522680
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov edx, dword [ebx + 8]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 8]
add eax, dword [edx + 0x20]
mov edx, dword [ebp - 0x28]
inc edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x28], edx
cmp edx, dword [edi + 0xc]
jl 0x522661
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14
mov ecx, dword [ebx + 0x18]
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx]
mov ecx, dword [ecx + 8]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], ecx
cmp eax, edx
jne 0x522919
cmp edx, ecx
jne 0x522919
cmp dword [edi + 0xc], 0
mov dword [ebp - 0x2c], 0
jle 0x522a87
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cmp dword [edi + 8], 0
mov edx, eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x30], 0
jle 0x5228db
movzx eax, byte [edx]
inc edx
mov ecx, dword [ecx]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], edx
mov eax, dword [esi + eax*4]
mov ecx, eax
shr ecx, 0x18
imul ecx, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
mov eax, 0x80808081
mul ecx
mov eax, edx
shr eax, 7
mov dword [ebp - 0x38], eax
test eax, eax
je 0x5228bf
mov esi, dword [ebp - 0x24]
mov ecx, 0xff
shr esi, 0x18
sub ecx, esi
imul ecx, eax
mov eax, 0x80808081
imul ecx
imul eax, dword [ebp - 0x38], 0xff
add edx, ecx
sar edx, 7
mov edi, edx
shr edi, 0x1f
add edi, edx
cdq
add edi, esi
mov esi, dword [ebp - 0x34]
idiv edi
and esi, 0xff00ff
shl edi, 0x18
imul esi, dword [ebp - 0x1c]
mov ecx, eax
mov eax, dword [ebp - 0x24]
mov edx, 0x100
and eax, 0xff00ff
sub edx, ecx
imul eax, edx
shr esi, 8
and esi, 0xff00ff
imul esi, ecx
shr eax, 8
shr esi, 8
add esi, eax
mov eax, dword [ebp - 0x34]
and eax, 0xff00
and esi, 0xff00ff
imul eax, ecx
mov ecx, dword [ebp - 0x24]
and ecx, 0xff00
imul ecx, edx
imul eax, dword [ebp - 0x1c]
shr ecx, 8
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x20]
and eax, 0xff00
or esi, eax
or esi, edi
mov edi, dword [ebx + 0x14]
mov dword [ecx], esi
mov esi, dword [ebp - 0x10]
jmp 0x5228c2
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
add ecx, 4
mov edx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], ecx
cmp eax, dword [edi + 8]
jl 0x5227e7
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebx + 8]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 8]
add eax, dword [edx + 0x20]
mov edx, dword [ebp - 0x2c]
inc edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x2c], edx
cmp edx, dword [edi + 0xc]
jl 0x5227d1
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14
cmp dword [edi + 0xc], 0
mov dword [ebp - 0x2c], 0
jle 0x522a87
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cmp dword [edi + 8], 0
mov edx, eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x30], 0
jle 0x522a5c
movzx eax, byte [edx]
inc edx
mov ecx, dword [ecx]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x40], edx
mov eax, dword [esi + eax*4]
mov ecx, eax
shr ecx, 0x18
imul ecx, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
mov eax, 0x80808081
mul ecx
mov eax, edx
shr eax, 7
mov dword [ebp - 0x38], eax
test eax, eax
je 0x522a40
mov esi, dword [ebp - 0x18]
mov ecx, 0xff
shr esi, 0x18
sub ecx, esi
imul ecx, eax
mov eax, 0x80808081
imul ecx
imul eax, dword [ebp - 0x38], 0xff
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cdq
add ecx, esi
mov esi, 0x100
idiv ecx
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x34]
mov edx, eax
mov eax, dword [ebp - 0x18]
mov edi, ecx
and edi, 0xff0000
movzx ecx, cl
and eax, 0xff0000
imul edi, edx
sub esi, edx
imul ecx, edx
imul eax, esi
shr edi, 8
imul edi, dword [ebp - 0x1c]
imul ecx, dword [ebp - 0x20]
shr eax, 8
shr edi, 8
add edi, eax
shr ecx, 0x10
mov eax, dword [ebp - 0x18]
and edi, 0xff0000
movzx eax, al
imul eax, esi
shr eax, 8
add ecx, eax
movzx eax, cl
mov ecx, dword [ebp - 0x18]
or edi, eax
mov eax, dword [ebp - 0x34]
and ecx, 0xff00
and eax, 0xff00
imul ecx, esi
imul eax, edx
mov esi, dword [ebp - 0x10]
shr ecx, 8
imul eax, dword [ebp - 0x14]
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x24]
and eax, 0xff00
or edi, eax
mov eax, dword [ebp - 0x3c]
shl eax, 0x18
or edi, eax
mov dword [ecx], edi
mov edi, dword [ebx + 0x14]
jmp 0x522a43
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add ecx, 4
mov edx, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], ecx
cmp eax, dword [edi + 8]
jl 0x522946
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebx + 8]
mov eax, dword [eax + 0x20]
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 8]
add eax, dword [edx + 0x20]
mov edx, dword [ebp - 0x2c]
inc edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x2c], edx
cmp edx, dword [edi + 0xc]
jl 0x522930
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 0x64]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14