Function at 0x481310
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xb4
mov edx, 3
push ebx
mov ebx, dword [esp + 0xbc]
push ebp
mov ebp, ecx
push esi
push edi
mov ecx, ebx
call fcn.004819f0
mov esi, eax
lea eax, [esi - 1]
cmp eax, 2
jbe 0x481348
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xb4
ret 4
mov al, byte [ebp + 0x12]
mov dword [ebp + 0x1c], 0x8000
test al, al
je 0x481366
mov edx, 1
mov ecx, ebx
call fcn.004819f0
test eax, eax
jne 0x481397
mov edx, 0x10
mov ecx, ebx
call fcn.004819f0
mov cl, byte [ebp + 0x12]
mov dword [ebp + 0x1c], eax
test cl, cl
je 0x481382
cmp byte [ebp + 0x13], 0x10
jb 0x481397
shl eax, 8
mov edx, 8
mov ecx, ebx
mov dword [ebp + 0x1c], eax
call fcn.004819f0
or dword [ebp + 0x1c], eax
cmp esi, 3
mov byte [ebp + 0xe], 0
sete al
test al, al
mov byte [ebp + 0xd], al
je 0x481460
mov cl, byte [ebp + 0x1c]
and cl, 1
mov byte [ebp + 0xe], cl
mov eax, dword [ebx]
mov edx, eax
mov esi, eax
and edx, 0xf
sar esi, 4
lea ecx, [edx + 0x10]
mov edx, dword [ebx + 4]
mov esi, dword [edx + esi*2]
rol esi, cl
shr esi, cl
test esi, esi
jne 0x48183e
add eax, 0x10
and al, 0xf0
cmp eax, 0xfffffff0
mov dword [ebx], eax
jg 0x48183e
mov esi, dword [ebx + 8]
mov ecx, 0xfffffffe
sar eax, 3
sub ecx, eax
add edx, eax
add esi, ecx
mov dword [ebx + 4], edx
mov ecx, esi
mov dword [ebx + 8], esi
cmp ecx, 0xc
jae 0x481413
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xb4
ret 4
xor edx, edx
lea esi, [ebp + 0x68]
mov edi, 0xfffffffc
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
add ecx, 4
mov dword [ebx + 4], ecx
mov ecx, dword [ebx + 8]
add ecx, edi
test eax, eax
mov dword [ebx + 8], ecx
je 0x48183e
mov ecx, dword [ebp + 4]
sub ecx, 3
cmp eax, ecx
ja 0x48183e
mov dword [esi], eax
inc edx
add esi, 4
cmp edx, 3
jb 0x48141d
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0xb4
ret 4
cmp esi, 2
mov dword [ebp + 0x14], 0xffffffff
jne 0x4815b0
xor edi, edi
xor esi, esi
mov edx, 3
mov ecx, ebx
call fcn.004819f0
mov byte [esp + esi + 0x18], al
xor eax, 3
or edi, eax
inc esi
cmp esi, 8
jb 0x481474
test edi, edi
je 0x4815b0
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x20]
mov dword [ebp + 0x14], 0xe
rep stosd dword es:[edi], eax
xor edi, edi
xor ecx, ecx
xor edx, edx
mov dl, byte [esp + ecx + 0x18]
mov eax, dword [esp + edx*4 + 0x20]
lea esi, [esp + edx*4 + 0x20]
inc eax
inc ecx
cmp ecx, 8
mov dword [esi], eax
jb 0x4814af
xor edx, edx
mov dword [esp + 0x84], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 1
xor eax, eax
mov edi, dword [esp + 0x10]
mov esi, dword [esp + eax + 0x24]
mov ecx, 7
mov dword [esp + eax + 0x24], edx
sub ecx, edi
mov edi, esi
shl edi, cl
mov ecx, dword [esp + 0x14]
mov dword [esp + eax + 0xa8], edx
add edx, esi
mov esi, dword [esp + 0x10]
add eax, 4
add ecx, edi
inc esi
mov dword [esp + eax + 0x84], ecx
cmp eax, 0x18
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], esi
jbe 0x4814dd
cmp ecx, 0x80
mov dword [esp + 0x20], edx
mov dword [esp + 0xa4], edx
jne 0x48183e
xor eax, eax
mov dword [esp + 0x10], eax
xor edx, edx
mov dl, byte [esp + eax + 0x18]
test edx, edx
je 0x4815a2
mov eax, dword [esp + edx*4 + 0x20]
mov esi, dword [esp + edx*4 + 0xa4]
lea ecx, [eax + 1]
sub eax, esi
mov dword [esp + edx*4 + 0x20], ecx
mov esi, dword [esp + edx*4 + 0x80]
mov ecx, 7
sub ecx, edx
shl eax, cl
add eax, esi
lea esi, [ebp + 0x21b0]
add eax, esi
mov esi, 1
shl esi, cl
mov edi, eax
mov eax, dword [esp + 0x10]
lea edx, [edx + eax*8]
test esi, esi
jbe 0x4815a2
mov al, dl
mov dh, dl
mov eax, edx
mov ecx, esi
shl eax, 0x10
mov ax, dx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 8
mov dword [esp + 0x10], eax
jb 0x48153c
cmp dword [ebp + 0x14], 0xffffffff
jne 0x4815e0
mov eax, 3
lea ecx, [ebp + 0x3d]
mov byte [ecx - 1], al
mov byte [ecx], al
inc eax
add ecx, 2
cmp eax, 0x11
jb 0x4815be
mov eax, 0x11111111
mov dword [ebp + 0x58], eax
mov dword [ebp + 0x5c], eax
mov dword [ebp + 0x60], eax
mov word [ebp + 0x64], ax
jmp 0x48160d
mov ecx, 3
lea edx, [ebp + 0x3d]
mov al, cl
add edx, 2
sub al, 3
inc ecx
mov byte [edx - 3], al
mov byte [edx - 2], al
cmp ecx, 0x11
jb 0x4815e8
mov ecx, 0xe0e0e0e
mov dword [ebp + 0x58], ecx
mov dword [ebp + 0x5c], ecx
mov dword [ebp + 0x60], ecx
mov word [ebp + 0x64], cx
mov edx, dword [ebx + 4]
mov ecx, dword [ebx]
lea edi, [ebp + 0x2330]
lea esi, [ebp + 0x2230]
push edi
push esi
call fcn.00481a20
cmp eax, 0xfffffff0
mov dword [ebx], eax
jle 0x48163b
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xb4
ret 4
mov edx, dword [ebp + 0x18]
lea ecx, [edx + ebp + 0x2330]
mov edx, dword [ebx + 4]
push ecx
push edi
mov ecx, eax
call fcn.00481a20
cmp eax, 0xfffffff0
mov dword [ebx], eax
jle 0x481667
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xb4
ret 4
mov edx, dword [ebp + 0x18]
mov ecx, 0x290
add edx, 0x100
xor eax, eax
sub ecx, edx
lea edi, [edx + ebp + 0x2230]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov cl, byte [eax + esi]
mov edi, dword [esp + ecx*4 + 0x40]
lea ecx, [esp + ecx*4 + 0x40]
inc edi
inc eax
cmp eax, 0x290
mov dword [ecx], edi
jb 0x48169b
xor eax, eax
lea ecx, [esp + 0x44]
mov edx, 0xb
mov esi, dword [ecx]
add ecx, 4
dec edx
lea eax, [esi + eax*2]
jne 0x4816be
lea ecx, [ebp + 0x134]
mov edx, eax
mov dword [ebp + 0x130], eax
mov esi, 0xc
lea edi, [esp + 0x70]
mov dword [esp + 0x14], ecx
shl edx, 1
mov ebx, edx
add edi, 4
sub ebx, eax
mov dword [ecx + 0x18], ebx
mov ecx, dword [edi - 4]
mov dword [edi - 4], eax
add eax, ecx
add edx, ecx
mov ecx, 0x10
sub ecx, esi
mov ebx, edx
shl ebx, cl
mov ecx, dword [esp + 0x14]
inc esi
add ecx, 4
cmp esi, 0x10
mov dword [esp + 0x14], ecx
mov dword [ecx - 4], ebx
jbe 0x4816e4
cmp edx, 0x10000
mov dword [ebp + 0x148], 0x10000
jne 0x48183e
xor edx, edx
mov eax, 1
lea edi, [esp + 0x44]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edi
mov esi, dword [edi]
mov ecx, 0xb
sub ecx, eax
mov ebx, edx
shr ebx, cl
shl esi, cl
mov dword [edi], ebx
mov bl, al
mov bh, bl
mov ecx, esi
mov eax, ebx
lea edi, [edx + ebp + 0x160]
mov edx, ecx
shl eax, 0x10
mov ax, bx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x14]
and ecx, 3
add edx, esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
inc eax
add edi, 4
cmp eax, 0xb
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edi
jbe 0x481746
xor esi, esi
xor ebx, ebx
xor eax, eax
mov al, byte [ebx + ebp + 0x2230]
mov edi, eax
test edi, edi
je 0x481803
mov eax, dword [esp + edi*4 + 0x40]
cmp edi, 0xb
lea ecx, [eax + 1]
mov dword [esp + edi*4 + 0x40], ecx
jb 0x4817ca
mov word [ebp + eax*2 + 0x960], si
jmp 0x481803
mov ecx, 0xc
mov edx, 1
sub ecx, edi
shl eax, cl
shl edx, cl
lea eax, [eax + ebp + 0x960]
add edx, eax
cmp edi, 9
jb 0x4817ef
mov dword [eax], esi
mov dword [edx - 4], esi
jmp 0x481803
mov dword [eax], esi
mov dword [eax + 4], esi
add eax, 8
mov dword [eax], esi
mov dword [eax + 4], esi
add eax, 8
cmp eax, edx
jne 0x4817ef
inc ebx
add esi, 0x10001
cmp ebx, 0x290
jb 0x4817a1
lea esi, [ebp + 0x24c0]
lea edx, [ebp + 0x25b9]
mov edi, esi
xor ecx, ecx
mov edi, dword [esp + 0xc8]
push edx
xor eax, eax
push esi
mov edx, dword [edi + 4]
mov ecx, dword [edi]
call fcn.00481a20
cmp eax, 0xfffffff0
mov dword [edi], eax
jle 0x48184d
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xb4
ret 4
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov cl, byte [eax + esi]
mov edi, dword [esp + ecx*4 + 0x40]
lea ecx, [esp + ecx*4 + 0x40]
inc edi
inc eax
cmp eax, 0xf9
mov dword [ecx], edi
jb 0x48185a
xor eax, eax
lea ecx, [esp + 0x44]
mov edx, 8
mov esi, dword [ecx]
add ecx, 4
dec edx
lea eax, [esi + eax*2]
jne 0x48187d
lea ecx, [ebp + 0x1e6c]
mov edx, eax
mov dword [ebp + 0x1e68], eax
mov esi, 9
lea edi, [esp + 0x64]
mov dword [esp + 0x18], ecx
shl edx, 1
mov ebx, edx
add edi, 4
sub ebx, eax
mov dword [ecx + 0x24], ebx
mov ecx, dword [edi - 4]
mov dword [edi - 4], eax
add eax, ecx
add edx, ecx
mov ecx, 0x10
sub ecx, esi
mov ebx, edx
shl ebx, cl
mov ecx, dword [esp + 0x18]
inc esi
add ecx, 4
cmp esi, 0x10
mov dword [esp + 0x18], ecx
mov dword [ecx - 4], ebx
jbe 0x4818a3
test edx, edx
mov dword [ebp + 0x1e8c], 0x10000
je 0x4819de
cmp edx, 0x10000
jne 0x48183e
xor edx, edx
mov eax, 1
lea edi, [esp + 0x44]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
mov esi, dword [edi]
mov ecx, 8
sub ecx, eax
mov ebx, edx
shr ebx, cl
shl esi, cl
mov dword [edi], ebx
mov bl, al
mov bh, bl
mov ecx, esi
mov eax, ebx
lea edi, [edx + ebp + 0x1eb0]
mov edx, ecx
shl eax, 0x10
mov ax, bx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x18]
and ecx, 3
add edx, esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
inc eax
add edi, 4
cmp eax, 8
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
jbe 0x48190d
xor ebx, ebx
xor edi, edi
xor eax, eax
mov al, byte [edi + ebp + 0x24c0]
mov esi, eax
test esi, esi
je 0x4819cf
mov eax, dword [esp + esi*4 + 0x40]
cmp esi, 8
lea ecx, [eax + 1]
mov dword [esp + esi*4 + 0x40], ecx
jb 0x481990
mov byte [eax + ebp + 0x1fc0], bl
jmp 0x4819cf
mov ecx, 8
mov edx, 1
sub ecx, esi
shl eax, cl
shl edx, cl
lea eax, [eax + ebp + 0x1fc0]
add edx, eax
cmp esi, 6
jb 0x4819b7
mov word [eax], bx
mov word [edx - 2], bx
jmp 0x4819cf
mov word [eax], bx
mov word [eax + 2], bx
add eax, 4
mov word [eax], bx
mov word [eax + 2], bx
add eax, 4
cmp eax, edx
jne 0x4819b7
inc edi
add ebx, 0x101
cmp edi, 0xf9
jb 0x481968
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0xb4
ret 4