Function at 0x4818f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2e8
push ebx
push ebp
push esi
xor edx, edx
push edi
mov dword [esp + 0x14], edx
mov edi, 1
lea ecx, [esp + 0x72]
mov ebx, 0x10
xor esi, esi
mov word [ecx], dx
xor eax, eax
mov ebp, dword [esp + 0x2fc]
cmp byte [eax + ebp], 0
je 0x48193a
imul eax, edi
cdq
mov ebp, 0xff
idiv ebp
mov ax, word [edx*2 + 0x4cadf8]
xor word [ecx], ax
xor edx, edx
inc esi
movsx eax, si
cmp eax, 0x80
jl 0x481915
mov ax, word [ecx]
cmp ax, dx
je 0x481955
mov dword [esp + 0x14], 1
movsx eax, ax
inc edi
add ecx, 2
mov ax, word [eax*2 + 0x4caff8]
dec ebx
mov word [ecx - 2], ax
jne 0x48190e
cmp word [esp + 0x14], dx
je 0x481d84
mov cx, word [esp + 0x72]
mov word [esp + 0x4c], dx
mov word [esp + 0x4e], cx
mov word [esp + 0xb8], dx
mov word [esp + 0xd8], 1
lea eax, [esp + 0xda]
mov ecx, 0xf
mov word [eax - 0x20], 0xffff
mov word [eax], dx
add eax, 2
dec ecx
jne 0x4819a3
or ebp, 0xffffffff
mov word [esp + 0x28], dx
mov word [esp + 0x2a], dx
mov word [esp + 0x94], bp
mov word [esp + 0x96], dx
inc edx
movsx esi, dx
mov dword [esp + 0x18], edx
cmp word [esp + esi*2 + 0x4c], bp
jne 0x481a27
mov ax, word [esp + esi*2 + 0x28]
mov word [esp + esi*2 + 0x2a], ax
mov cx, word [esp + esi*2 + 0x28]
test cx, cx
jl 0x481b84
mov eax, esi
movsx ecx, cx
shl eax, 5
inc ecx
lea eax, [esp + eax + 0xb8]
mov di, word [eax]
mov word [eax + 0x20], di
movsx edi, word [eax]
add eax, 2
dec ecx
mov di, word [edi*2 + 0x4caff8]
mov word [eax - 2], di
jne 0x481a06
jmp 0x481b84
lea eax, [edx - 1]
movsx ecx, ax
mov edi, eax
mov dx, ax
cmp word [esp + ecx*2 + 0x4c], bp
mov dword [esp + 0x10], edi
jne 0x481a54
test dx, dx
jle 0x481a8b
dec edi
mov dx, di
mov dword [esp + 0x10], edi
movsx eax, dx
cmp word [esp + eax*2 + 0x4c], bp
je 0x481a3d
test dx, dx
jle 0x481a8b
mov ecx, edi
dec ecx
movsx eax, cx
shl eax, 1
cmp word [esp + eax + 0x4c], bp
je 0x481a86
movsx ebx, dx
mov bx, word [esp + ebx*2 + 0x94]
cmp bx, word [esp + eax + 0x94]
jge 0x481a86
mov edi, ecx
mov dx, cx
mov dword [esp + 0x10], edi
test cx, cx
jg 0x481a5b
movsx ebp, dx
mov cx, word [esp + esi*2 + 0x28]
mov ax, word [esp + ebp*2 + 0x28]
movsx edx, ax
sub edx, ebp
movsx ebx, cx
add edx, esi
cmp ebx, edx
jle 0x481aad
mov word [esp + esi*2 + 0x2a], cx
jmp 0x481aba
mov ecx, dword [esp + 0x18]
sub eax, edi
add eax, ecx
mov word [esp + esi*2 + 0x2a], ax
mov edx, esi
mov ecx, 8
shl edx, 5
xor eax, eax
mov dword [esp + 0x1c], edx
lea edi, [esp + edx + 0xd8]
rep stosd dword es:[edi], eax
mov ax, word [esp + ebp*2 + 0x28]
test ax, ax
jl 0x481b4c
mov edi, ebp
xor ecx, ecx
shl edi, 5
lea edi, [esp + edi + 0xb8]
mov dword [esp + 0x10], edi
movsx edi, ax
inc edi
mov eax, dword [esp + 0x10]
mov ax, word [eax]
cmp ax, 0xffff
je 0x481b3d
movsx edx, word [esp + ebp*2 + 0x4c]
movsx ebx, word [esp + esi*2 + 0x4c]
movsx eax, ax
sub ebx, edx
lea eax, [ebx + eax + 0xff]
mov ebx, 0xff
cdq
idiv ebx
mov eax, esi
shl eax, 4
add eax, esi
sub eax, ebp
add eax, ecx
mov dx, word [edx*2 + 0x4cadf8]
mov word [esp + eax*2 + 0xd8], dx
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
inc ecx
add ebx, 2
dec edi
mov dword [esp + 0x10], ebx
jne 0x481af3
mov cx, word [esp + esi*2 + 0x28]
test cx, cx
jl 0x481b7d
movsx ecx, cx
lea eax, [esp + edx + 0xb8]
inc ecx
mov dx, word [eax]
xor word [eax + 0x20], dx
movsx edx, word [eax]
add eax, 2
dec ecx
mov dx, word [edx*2 + 0x4caff8]
mov word [eax - 2], dx
jne 0x481b61
mov edx, dword [esp + 0x18]
or ebp, 0xffffffff
mov bx, word [esp + esi*2 + 0x2a]
mov eax, edx
sub eax, ebx
cmp dx, 0x10
mov dword [esp + 0x1c], ebx
mov word [esp + esi*2 + 0x96], ax
jge 0x481c4f
mov ax, word [esp + esi*2 + 0x72]
lea ecx, [esp + esi*2 + 0x4e]
cmp ax, bp
je 0x481bc1
movsx eax, ax
mov ax, word [eax*2 + 0x4cadf8]
mov word [ecx], ax
jmp 0x481bc6
mov word [ecx], 0
cmp bx, 1
jl 0x481c37
movsx edx, bx
mov edi, 1
lea ebp, [esp + esi*2 + 0x70]
mov dword [esp + 0x14], edx
mov dx, word [ebp]
cmp dx, 0xffff
je 0x481c21
mov eax, esi
shl eax, 4
add eax, edi
mov ax, word [esp + eax*2 + 0xd8]
test ax, ax
je 0x481c21
movsx eax, ax
movsx edx, dx
movsx eax, word [eax*2 + 0x4caff8]
add eax, edx
mov ebx, 0xff
cdq
idiv ebx
mov ebx, dword [esp + 0x1c]
mov ax, word [edx*2 + 0x4cadf8]
xor word [ecx], ax
mov eax, dword [esp + 0x14]
inc edi
sub ebp, 2
dec eax
mov dword [esp + 0x14], eax
jne 0x481bdc
mov edx, dword [esp + 0x18]
or ebp, 0xffffffff
movsx eax, word [ecx]
cmp bx, 8
mov ax, word [eax*2 + 0x4caff8]
mov word [ecx], ax
jle 0x4819cf
inc edx
movsx ecx, dx
mov bp, word [esp + ecx*2 + 0x28]
movsx ebx, bp
cmp ebx, 8
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebx
jg 0x481d84
test bp, bp
jl 0x481c95
mov edx, ecx
shl edx, 5
lea eax, [esp + edx + 0xb8]
lea edx, [ebx + 1]
movsx esi, word [eax]
add eax, 2
dec edx
mov si, word [esi*2 + 0x4caff8]
mov word [eax - 2], si
jne 0x481c80
cmp bp, 1
jl 0x481cb4
shl ecx, 5
lea edi, [esp + 0x72]
lea esi, [esp + ecx + 0xba]
mov ecx, ebx
shr ecx, 1
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x20], 0xfe
mov esi, 1
cmp bp, si
mov dword [esp + 0x10], esi
jl 0x481d3d
lea ecx, [esp + 0x72]
mov ebp, ebx
mov di, si
mov ax, word [ecx]
cmp ax, 0xffff
je 0x481d0b
movsx eax, ax
add eax, esi
mov ebx, 0xff
cdq
idiv ebx
mov ebx, dword [esp + 0x24]
movsx eax, dx
mov word [ecx], dx
xor di, word [eax*2 + 0x4cadf8]
inc esi
add ecx, 2
dec ebp
jne 0x481ce3
test di, di
jne 0x481d39
mov ecx, dword [esp + 0x14]
mov dx, word [esp + 0x18]
movsx eax, cx
shl eax, 1
inc ecx
mov word [esp + eax + 0x28], dx
mov dx, word [esp + 0x20]
mov word [esp + eax + 0x4c], dx
mov dword [esp + 0x14], ecx
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
inc eax
dec edx
cmp ax, 0xff
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edx
jle 0x481ccc
cmp word [esp + 0x14], bp
jne 0x481d91
test bp, bp
jle 0x481d84
lea ecx, [esp + 0x4c]
mov edx, ebx
movsx eax, word [ecx]
mov esi, dword [esp + 0x2fc]
add ecx, 2
add eax, esi
mov bl, byte [eax]
xor bl, 1
dec edx
mov byte [eax], bl
jne 0x481d6b
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2e8
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2e8
ret