Function at 0x10031140
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
dec eax
mov esi, edi
cmp eax, 0x1f
ja case.0x10031160.7
xor ecx, ecx
mov cl, byte [eax + 0x10031e08]
jmp dword [ecx*4 + 0x10031dec]
cmp dword [esp + 0x1c], 8
jne case.0x10031160.7
mov ebp, dword [esp + 0x30]
xor esi, esi
test ebp, ebp
jle 0x10031dd6
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
mov eax, esi
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
mov ecx, eax
mov eax, esi
sub ecx, edx
mov edx, 0x80
sar edx, cl
mov dword [esp + 0x30], edx
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x30]
sar eax, 3
and dl, byte [eax + ebx]
neg dl
sbb edx, edx
xor eax, eax
neg edx
mov al, byte [edi + edx*4 + 1]
mov ecx, eax
shl ecx, 3
sub ecx, eax
lea ecx, [eax + ecx*4]
lea ecx, [eax + ecx*2]
xor eax, eax
mov al, byte [edi + edx*4 + 2]
imul eax, eax, 0x1e
add ecx, eax
xor eax, eax
mov al, byte [edi + edx*4]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
add ecx, eax
mov eax, 0x51eb851f
imul ecx
mov eax, dword [esp + 0x20]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov byte [esi + eax], dl
inc esi
cmp esi, ebp
jl 0x10031188
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov eax, dword [esp + 0x1c]
dec eax
je 0x10031299
sub eax, 7
jne case.0x10031160.7
mov edi, dword [esp + 0x30]
xor ebx, ebx
test edi, edi
jle 0x10031dd6
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov ecx, ebx
xor edx, edx
sar ecx, 1
test bl, 1
mov dl, byte [ecx + ebp]
je 0x10031247
and edx, 0xf
jmp 0x1003124a
sar edx, 4
xor eax, eax
mov al, byte [esi + edx*4 + 1]
mov ecx, eax
shl ecx, 3
sub ecx, eax
lea ecx, [eax + ecx*4]
lea ecx, [eax + ecx*2]
xor eax, eax
mov al, byte [esi + edx*4 + 2]
imul eax, eax, 0x1e
add ecx, eax
xor eax, eax
mov al, byte [esi + edx*4]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
add ecx, eax
mov eax, 0x51eb851f
imul ecx
mov eax, dword [esp + 0x20]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov byte [ebx + eax], dl
inc ebx
cmp ebx, edi
jl 0x10031234
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov esi, dword [esp + 0x30]
push 1
push esi
call fcn.10032be0
mov ecx, eax
or eax, 0xffffffff
mov edx, ecx
push 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
xor ebx, ebx
shl ecx, 5
add eax, ecx
test esi, esi
mov dword [esp + 0x2c], eax
jle 0x10031dd6
mov edi, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
mov ebp, ebx
mov eax, ebx
and ebp, 7
sar eax, 1
mov ecx, dword [edx + ebp*4]
xor edx, edx
mov dl, byte [eax + esi]
test bl, 1
mov esi, edx
je 0x10031305
and esi, 0xf
jmp 0x10031308
sar esi, 4
xor eax, eax
mov al, byte [edi + esi*4 + 1]
mov edx, eax
shl edx, 3
sub edx, eax
lea edx, [eax + edx*4]
lea edx, [eax + edx*2]
xor eax, eax
mov al, byte [edi + esi*4 + 2]
imul eax, eax, 0x1e
add edx, eax
xor eax, eax
mov al, byte [edi + esi*4]
lea esi, [eax + eax*4]
lea eax, [eax + esi*2]
add edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [ecx - 0x28]
xor ecx, ecx
mov esi, edx
test eax, eax
setle cl
dec ecx
and eax, ecx
cmp esi, eax
jg 0x10031374
mov eax, dword [esp + 0x20]
mov edx, ebx
sar edx, 3
mov ecx, ebp
lea esi, [edx + eax]
mov edx, 0x80
sar edx, cl
mov al, byte [esi]
not dl
and al, dl
mov byte [esi], al
mov eax, dword [esp + 0x30]
inc ebx
cmp ebx, eax
jl 0x100312e0
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov eax, dword [esp + 0x1c]
dec eax
je 0x1003151e
sub eax, 3
je 0x1003141a
sub eax, 4
jne case.0x10031160.7
cmp dword [esp + 0x14], 4
jne case.0x10031160.7
mov ebp, dword [esp + 0x30]
xor esi, esi
test ebp, ebp
jle 0x10031dd6
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
xor eax, eax
mov al, byte [edi]
lea edx, [ecx + eax*4]
xor ecx, ecx
mov cl, byte [edx]
lea eax, [ecx + ecx*4]
lea ecx, [ecx + eax*2]
xor eax, eax
mov al, byte [edx + 1]
mov ebx, eax
shl ebx, 3
sub ebx, eax
lea ebx, [eax + ebx*4]
lea eax, [eax + ebx*2]
add ecx, eax
xor eax, eax
mov al, byte [edx + 2]
imul eax, eax, 0x1e
add ecx, eax
mov eax, 0x51eb851f
imul ecx
mov eax, dword [esp + 0x20]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov byte [esi + eax], dl
inc esi
inc edi
cmp esi, ebp
jl 0x100313c2
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
push 4
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
xor ebx, ebx
shl ecx, 5
add eax, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x10031dd6
mov eax, dword [esp + 0x2c]
mov edx, ebx
and edx, 7
xor ecx, ecx
mov edi, dword [eax + edx*4]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov cl, byte [edx]
xor edx, edx
mov dl, byte [eax + ecx*4 + 2]
lea eax, [eax + ecx*4]
xor ecx, ecx
mov ebp, edx
mov cl, byte [eax]
mov esi, ecx
xor ecx, ecx
mov cl, byte [eax + 1]
mov eax, ecx
shl eax, 3
sub eax, ecx
lea edx, [ecx + eax*4]
lea eax, [esi + esi*4]
lea edx, [ecx + edx*2]
lea eax, [esi + eax*2]
add edx, eax
mov eax, ebp
imul eax, eax, 0x1e
add edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [edi + 0x28]
mov dword [esp + 0x1c], edx
cmp eax, 0xff
mov edx, eax
jl 0x100314b2
mov edx, 0xff
xor eax, eax
cmp dword [esp + 0x1c], edx
setge al
shl eax, 1
xor edx, edx
cmp ebp, edi
setg dl
or eax, edx
xor edx, edx
shl eax, 1
cmp ecx, edi
setg dl
or eax, edx
xor ecx, ecx
shl eax, 1
cmp esi, edi
setg cl
or eax, ecx
test bl, 1
je 0x100314ef
mov ecx, dword [esp + 0x20]
mov edx, ebx
sar edx, 1
add ecx, edx
or byte [ecx], al
jmp 0x100314fd
mov ecx, dword [esp + 0x20]
mov edx, ebx
shl al, 4
sar edx, 1
mov byte [edx + ecx], al
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
inc ebx
inc ecx
cmp ebx, eax
mov dword [esp + 0x24], ecx
jl 0x10031442
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov esi, dword [esp + 0x30]
push 1
push esi
call fcn.10032be0
mov ecx, eax
or eax, 0xffffffff
mov edi, dword [esp + 0x20]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 4
and ecx, 3
rep stosb byte es:[edi], al
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
xor ebp, ebp
shl ecx, 5
add eax, ecx
test esi, esi
mov dword [esp + 0x2c], eax
jle 0x10031dd6
jmp 0x1003156b
mov eax, dword [esp + 0x2c]
mov ecx, ebp
xor edx, edx
and ecx, 7
mov edi, dword [eax + ecx*4]
mov eax, dword [esp + 0x24]
mov dl, byte [eax]
mov eax, dword [esp + 0x28]
lea esi, [eax + edx*4]
xor eax, eax
mov al, byte [esi]
lea edx, [eax + eax*4]
lea edx, [eax + edx*2]
xor eax, eax
mov al, byte [esi + 1]
mov ebx, eax
shl ebx, 3
sub ebx, eax
lea ebx, [eax + ebx*4]
lea eax, [eax + ebx*2]
add edx, eax
xor eax, eax
mov al, byte [esi + 2]
imul eax, eax, 0x1e
add edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [edi - 0x28]
mov esi, edx
xor edx, edx
test eax, eax
setle dl
dec edx
and eax, edx
cmp esi, eax
jg 0x100315e8
mov edx, dword [esp + 0x20]
mov eax, ebp
sar eax, 3
add eax, edx
mov edx, 0x80
sar edx, cl
mov cl, byte [eax]
not dl
and cl, dl
mov byte [eax], cl
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
inc ebp
inc ecx
cmp ebp, eax
mov dword [esp + 0x24], ecx
jl 0x10031567
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10031615
shr eax, 1
jne 0x10031611
cmp dword [esp + 0x14], 4
jne case.0x10031160.7
mov esi, dword [esp + 0x30]
xor eax, eax
test esi, esi
jle 0x10031b2e
mov ecx, dword [esp + 0x24]
xor edx, edx
inc eax
mov dl, byte [ecx + 1]
add ecx, 2
mov byte [eax + edi - 1], dl
cmp eax, esi
jl 0x10031632
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov eax, dword [esp + 0x1c]
dec eax
je 0x1003186a
sub eax, 3
je 0x10031773
sub eax, 4
jne case.0x10031160.7
cmp dword [esp + 0x14], 4
je 0x1003170e
push 8
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
xor ebp, ebp
shl ecx, 5
add eax, ecx
mov ecx, dword [esp + 0x30]
test ecx, ecx
mov dword [esp + 0x2c], eax
jle 0x10031dd6
mov esi, dword [esp + 0x24]
jmp 0x100316a6
mov eax, dword [esp + 0x2c]
mov edx, ebp
and edx, 7
mov ecx, dword [eax + edx*4]
xor edx, edx
mov dl, byte [esi]
inc esi
cmp ecx, edx
jle 0x100316bb
xor ebx, ebx
jmp 0x100316c2
sub edx, ecx
sar edx, 6
mov ebx, edx
xor edx, edx
mov dl, byte [esi]
inc esi
cmp ecx, edx
jle 0x100316cf
xor edx, edx
jmp 0x100316d7
sub edx, ecx
sar edx, 3
and edx, 0x1c
xor eax, eax
mov al, byte [esi]
inc esi
mov edi, eax
cmp ecx, edi
jle 0x100316e6
xor ecx, ecx
jmp 0x100316f0
sub edi, ecx
and edi, 0xe0
mov ecx, edi
mov eax, dword [esp + 0x30]
or bl, dl
or bl, cl
mov ecx, dword [esp + 0x20]
mov byte [ebp + ecx], bl
inc ebp
cmp ebp, eax
jl 0x100316a2
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov ebx, dword [esp + 0x30]
xor ebp, ebp
test ebx, ebx
jle 0x10031dd6
mov ecx, dword [esp + 0x24]
xor edx, edx
xor eax, eax
mov dl, byte [ecx]
mov al, byte [ecx + 1]
inc ecx
mov esi, edx
inc ecx
xor edx, edx
mov dl, byte [ecx]
inc ecx
mov edi, edx
mov edx, eax
shl edx, 3
imul edi, edi, 0x1e
sub edx, eax
lea edx, [eax + edx*4]
lea edx, [eax + edx*2]
lea eax, [esi + esi*4]
lea eax, [esi + eax*2]
add edx, eax
mov eax, 0x51eb851f
add edx, edi
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x20]
mov byte [ebp + eax], dl
inc ebp
cmp ebp, ebx
jl 0x10031720
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
push 4
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
xor ebx, ebx
shl ecx, 5
add eax, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x10031dd6
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
xor ecx, ecx
mov cl, byte [esi]
mov edx, ebx
and edx, 7
mov edi, ecx
inc esi
xor ecx, ecx
mov ebp, dword [eax + edx*4]
xor edx, edx
mov cl, byte [esi]
mov dl, byte [esi + 1]
mov eax, ecx
inc esi
shl eax, 3
sub eax, ecx
mov dword [esp + 0x24], edx
inc esi
lea edx, [ecx + eax*4]
lea eax, [edi + edi*4]
lea edx, [ecx + edx*2]
lea eax, [edi + eax*2]
add edx, eax
mov eax, dword [esp + 0x24]
imul eax, eax, 0x1e
add edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [ebp + 0x28]
mov dword [esp + 0x1c], edx
cmp eax, 0xff
mov edx, eax
jl 0x10031805
mov edx, 0xff
xor eax, eax
cmp dword [esp + 0x1c], edx
setge al
shl eax, 1
xor edx, edx
cmp dword [esp + 0x24], ebp
setg dl
or eax, edx
xor edx, edx
shl eax, 1
cmp ecx, ebp
setg dl
or eax, edx
xor ecx, ecx
shl eax, 1
cmp edi, ebp
setg cl
or eax, ecx
test bl, 1
je 0x10031844
mov ecx, dword [esp + 0x20]
mov edx, ebx
sar edx, 1
add ecx, edx
or byte [ecx], al
jmp 0x10031852
mov ecx, dword [esp + 0x20]
mov edx, ebx
shl al, 4
sar edx, 1
mov byte [edx + ecx], al
mov eax, dword [esp + 0x30]
inc ebx
cmp ebx, eax
jl 0x1003179f
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov esi, dword [esp + 0x30]
push 1
push esi
call fcn.10032be0
mov ecx, eax
or eax, 0xffffffff
mov edx, ecx
push 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
mov dword [esp + 0x28], 0
shl ecx, 5
add eax, ecx
test esi, esi
mov dword [esp + 0x2c], eax
jle 0x10031dd6
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
xor eax, eax
and ecx, 7
mov al, byte [esi]
inc esi
mov ebp, dword [edx + ecx*4]
mov edi, eax
xor eax, eax
xor ebx, ebx
mov al, byte [esi]
mov bl, byte [esi + 1]
mov edx, eax
inc esi
shl edx, 3
imul ebx, ebx, 0x1e
sub edx, eax
inc esi
lea edx, [eax + edx*4]
lea edx, [eax + edx*2]
lea eax, [edi + edi*4]
lea eax, [edi + eax*2]
add edx, eax
mov eax, 0x51eb851f
add edx, ebx
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [ebp - 0x28]
mov edi, edx
xor edx, edx
test eax, eax
setle dl
dec edx
and eax, edx
cmp edi, eax
jg 0x10031931
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
sar eax, 3
add eax, edx
mov edx, 0x80
sar edx, cl
mov cl, byte [eax]
not dl
and cl, dl
mov byte [eax], cl
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x100318b7
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov eax, dword [esp + 0x1c]
dec eax
je 0x10031ca1
sub eax, 3
je 0x10031b37
sub eax, 4
jne case.0x10031160.7
cmp dword [esp + 0x14], 4
je 0x10031a77
push 8
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
xor edx, edx
shl ecx, 5
add eax, ecx
mov ecx, dword [esp + 0x30]
test ecx, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
jle 0x10031dd6
mov ebp, dword [esp + 0x24]
jmp 0x100319af
mov eax, dword [esp + 0x2c]
and edx, 7
mov ebx, dword [eax + edx*4]
xor edx, edx
mov dl, byte [ebp + 3]
xor eax, eax
mov al, byte [ebp + 2]
lea ecx, [eax + edx]
cmp ecx, 0xff
jle 0x100319cf
mov ecx, 0xff
or al, 0xff
sub al, cl
xor ecx, ecx
mov cl, byte [ebp + 1]
and eax, 0xff
add ecx, edx
mov esi, eax
cmp ecx, 0xff
jle 0x100319ee
mov ecx, 0xff
or al, 0xff
sub al, cl
xor ecx, ecx
mov cl, byte [ebp]
and eax, 0xff
add ecx, edx
mov edi, eax
cmp ecx, 0xff
jle 0x10031a0d
mov ecx, 0xff
or dl, 0xff
sub dl, cl
and edx, 0xff
cmp ebx, esi
jle 0x10031a20
xor ecx, ecx
jmp 0x10031a27
sub esi, ebx
sar esi, 6
mov ecx, esi
cmp ebx, edi
jle 0x10031a2f
xor eax, eax
jmp 0x10031a39
sub edi, ebx
sar edi, 3
and edi, 0x1c
mov eax, edi
cmp ebx, edx
jle 0x10031a41
xor edx, edx
jmp 0x10031a49
sub edx, ebx
and edx, 0xe0
or cl, al
mov eax, dword [esp + 0x20]
or cl, dl
mov edx, dword [esp + 0x28]
add ebp, 4
mov byte [edx + eax], cl
mov eax, dword [esp + 0x30]
inc edx
cmp edx, eax
mov dword [esp + 0x28], edx
jl 0x100319ab
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x10031b2e
mov edi, dword [esp + 0x24]
mov ebx, eax
xor ecx, ecx
xor edx, edx
mov cl, byte [edi + 3]
mov dl, byte [edi + 2]
mov ebp, ecx
lea eax, [edx + ebp]
cmp eax, 0xff
jle 0x10031aa4
mov eax, 0xff
or cl, 0xff
xor edx, edx
mov dl, byte [edi + 1]
sub cl, al
and ecx, 0xff
mov eax, ecx
lea ecx, [ebp + edx]
cmp ecx, 0xff
jle 0x10031ac7
mov ecx, 0xff
or dl, 0xff
sub dl, cl
and edx, 0xff
mov ecx, edx
xor edx, edx
mov dl, byte [edi]
add ebp, edx
mov edx, 0xff
cmp ebp, 0xff
jg 0x10031ae9
mov edx, ebp
mov ebp, ecx
add edi, 4
shl ebp, 3
sub ebp, ecx
lea ebp, [ecx + ebp*4]
lea ecx, [ecx + ebp*2]
lea ebp, [eax + eax*4]
lea eax, [eax + ebp*2]
add ecx, eax
or al, 0xff
sub al, dl
and eax, 0xff
imul eax, eax, 0x1e
add ecx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov byte [esi], dl
inc esi
dec ebx
jne 0x10031a89
mov edi, dword [esp + 0x20]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
push 4
call fcn.100427b0
mov edx, dword [esp + 0x30]
add esp, 4
and edx, 7
mov dword [esp + 0x28], 0
shl edx, 5
add eax, edx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x10031dd6
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
and eax, 7
xor edx, edx
mov ebx, dword [ecx + eax*4]
mov eax, dword [esp + 0x24]
xor ecx, ecx
mov dl, byte [eax + 3]
mov cl, byte [eax + 2]
mov ebp, edx
lea esi, [ecx + ebp]
mov ecx, 0xff
cmp esi, 0xff
jg 0x10031b95
mov ecx, esi
or dl, 0xff
sub dl, cl
xor ecx, ecx
mov cl, byte [eax + 1]
and edx, 0xff
mov edi, edx
lea esi, [ebp + ecx]
mov ecx, 0xff
cmp esi, 0xff
jg 0x10031bba
mov ecx, esi
or dl, 0xff
sub dl, cl
xor ecx, ecx
mov cl, byte [eax]
and edx, 0xff
mov esi, edx
lea eax, [ecx + ebp]
cmp eax, 0xff
jle 0x10031bda
mov eax, 0xff
or dl, 0xff
sub dl, al
mov eax, esi
and edx, 0xff
shl eax, 3
mov ebp, edx
sub eax, esi
lea edx, [edi + edi*4]
lea ecx, [esi + eax*4]
lea eax, [edi + edx*2]
mov edx, ebp
imul edx, edx, 0x1e
lea ecx, [esi + ecx*2]
add ecx, eax
mov eax, 0x51eb851f
add ecx, edx
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [ebx + 0x28]
cmp eax, 0xff
mov dword [esp + 0x1c], edx
mov ecx, eax
jl 0x10031c29
mov ecx, 0xff
mov edx, dword [esp + 0x1c]
xor eax, eax
cmp edx, ecx
setge al
shl eax, 1
xor ecx, ecx
cmp ebp, ebx
setg cl
or eax, ecx
xor edx, edx
shl eax, 1
cmp esi, ebx
setg dl
or eax, edx
xor ecx, ecx
shl eax, 1
cmp edi, ebx
setg cl
or eax, ecx
mov ecx, dword [esp + 0x28]
test cl, 1
je 0x10031c6c
mov esi, dword [esp + 0x20]
mov edx, ecx
sar edx, 1
add edx, esi
or byte [edx], al
jmp 0x10031c7a
mov esi, dword [esp + 0x20]
mov edx, ecx
shl al, 4
sar edx, 1
mov byte [edx + esi], al
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
inc ecx
add edx, 4
cmp ecx, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], edx
jl 0x10031b65
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov esi, dword [esp + 0x30]
push 1
push esi
call fcn.10032be0
mov ecx, eax
or eax, 0xffffffff
mov edx, ecx
push 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
call fcn.100427b0
mov ecx, dword [esp + 0x30]
add esp, 4
and ecx, 7
mov dword [esp + 0x28], 0
shl ecx, 5
add eax, ecx
test esi, esi
mov dword [esp + 0x2c], eax
jle 0x10031dd6
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
and esi, 7
xor eax, eax
mov al, byte [ebp + 3]
mov ecx, dword [edx + esi*4]
xor edx, edx
mov dl, byte [ebp + 2]
mov edi, eax
lea eax, [edx + edi]
cmp eax, 0xff
jle 0x10031d17
mov eax, 0xff
or dl, 0xff
sub dl, al
and edx, 0xff
mov eax, edx
xor edx, edx
mov dl, byte [ebp + 1]
add edx, edi
cmp edx, 0xff
jle 0x10031d38
mov edx, 0xff
or bl, 0xff
sub bl, dl
and ebx, 0xff
mov edx, ebx
xor ebx, ebx
mov bl, byte [ebp]
add edi, ebx
mov ebx, 0xff
cmp edi, 0xff
jg 0x10031d5b
mov ebx, edi
mov edi, edx
shl edi, 3
sub edi, edx
lea edi, [edx + edi*4]
lea edx, [edx + edi*2]
lea edi, [eax + eax*4]
lea eax, [eax + edi*2]
add edx, eax
or al, 0xff
sub al, bl
and eax, 0xff
imul eax, eax, 0x1e
add edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [ecx - 0x28]
xor ecx, ecx
test eax, eax
setle cl
dec ecx
and eax, ecx
cmp edx, eax
jg 0x10031dbe
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
sar edx, 3
add eax, edx
mov edx, 0x80
mov ecx, esi
sar edx, cl
mov cl, byte [eax]
not dl
and cl, dl
mov byte [eax], cl
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
inc eax
add ebp, 4
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x10031cee
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
ret 0x24