Function at 0x10003865
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0xc]
shl ecx, 1
mov word [eax], bx
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x40]
cmp ecx, 1
mov dx, word [edx + 2]
mov dword [esp + 0x14], ecx
mov word [eax + 2], dx
mov word [0x10023b70], bx
mov word [0x10023b90], 1
jle 0x100038b2
mov eax, 0x10023b92
dec ecx
mov word [eax - 0x20], 0xffff
mov word [eax], bx
add eax, 2
dec ecx
jne 0x100038a3
mov eax, dword [esi + 0x44]
mov word [eax], bx
mov ecx, dword [esi + 0x44]
mov word [ecx + 2], bx
mov edx, dword [esi + 0x48]
mov word [edx], 0xffff
mov eax, dword [esi + 0x48]
mov word [eax + 2], bx
mov eax, dword [esi + 0x40]
inc ebx
lea ecx, [ebx + ebx]
cmp word [ecx + eax], 0xffff
jne 0x1000392b
mov eax, dword [esi + 0x44]
mov dx, word [ecx + eax]
mov word [eax + ebx*2 + 2], dx
mov eax, dword [esi + 0x44]
xor edx, edx
cmp word [ecx + eax], dx
jl 0x10003a88
mov eax, ebx
shl eax, 5
add eax, 0x10023b70
mov di, word [eax]
inc edx
mov word [eax + 0x20], di
mov ebp, dword [esi + 0x20]
movsx edi, word [eax]
add eax, 2
mov di, word [ebp + edi*2]
mov word [eax - 2], di
mov edi, dword [esi + 0x44]
movsx edi, word [ecx + edi]
cmp edx, edi
jle 0x10003901
jmp 0x10003a88
lea ebp, [ebx - 1]
cmp word [eax + ebp*2], 0xffff
lea eax, [eax + ebp*2]
jne 0x10003946
test ebp, ebp
jle 0x1000397d
sub eax, 2
dec ebp
cmp word [eax], 0xffff
je 0x10003938
test ebp, ebp
jle 0x1000397d
lea edx, [ebp + ebp]
mov ecx, ebp
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x40]
dec ecx
lea eax, [ecx + ecx]
cmp word [eax + edx], 0xffff
je 0x10003979
mov edx, dword [esi + 0x48]
mov edi, dword [esp + 0x18]
mov di, word [edx + edi]
cmp di, word [eax + edx]
jge 0x10003979
mov ebp, ecx
mov dword [esp + 0x18], eax
test ecx, ecx
jg 0x10003954
mov ecx, dword [esi + 0x44]
mov ax, word [ecx + ebp*2]
mov dx, word [ecx + ebx*2]
movsx edi, ax
mov dword [esp + 0x18], edx
sub edi, ebp
movsx edx, dx
add edi, ebx
cmp edx, edi
jle 0x100039a1
mov ax, word [esp + 0x18]
jmp 0x100039a5
sub eax, ebp
add eax, ebx
mov word [ecx + ebx*2 + 2], ax
mov ecx, dword [esp + 0x14]
test ecx, ecx
jle 0x100039c8
mov edi, ebx
xor eax, eax
shl edi, 5
add edi, 0x10023b90
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [esi + 0x44]
mov dword [esp + 0x10], 0
cmp word [ecx + ebp*2], 0
jl 0x10003a4b
mov eax, ebp
shl eax, 5
add eax, 0x10023b70
mov dword [esp + 0x18], eax
cmp word [eax], 0xffff
je 0x10003a30
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x10]
movsx edx, word [eax + ebp*2]
movsx edi, word [eax + ebx*2]
mov eax, dword [esp + 0x18]
sub edi, edx
mov edx, ecx
movsx eax, word [eax]
add edx, edi
mov edi, dword [esp + 0x10]
add eax, edx
cdq
idiv ecx
mov eax, dword [esi + 0x1c]
mov ecx, ebx
shl ecx, 4
add ecx, ebx
sub ecx, ebp
add ecx, edi
mov dx, word [eax + edx*2]
mov eax, dword [esp + 0x18]
mov word [ecx*2 + 0x10023b90], dx
mov edx, dword [esi + 0x44]
mov ecx, dword [esp + 0x10]
inc ecx
add eax, 2
movsx edx, word [edx + ebp*2]
cmp ecx, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jle 0x100039e8
mov eax, dword [esi + 0x44]
lea ecx, [ebx + ebx]
xor edx, edx
cmp word [ecx + eax], dx
jl 0x10003a88
mov eax, ebx
shl eax, 5
add eax, 0x10023b70
mov di, word [eax]
xor word [eax + 0x20], di
mov ebp, dword [esi + 0x20]
movsx edi, word [eax]
inc edx
add eax, 2
mov di, word [ebp + edi*2]
mov word [eax - 2], di
mov edi, dword [esi + 0x44]
movsx edi, word [ecx + edi]
cmp edx, edi
jle 0x10003a63
mov edx, dword [esi + 0x44]
mov ax, bx
sub ax, word [edx + ebx*2 + 2]
mov edx, dword [esi + 0x48]
mov word [edx + ebx*2 + 2], ax
mov eax, dword [esp + 0x14]
cmp ebx, eax
jge 0x10003b6a
mov eax, dword [esi + 0x30]
mov ax, word [eax + ebx*2 + 2]
cmp ax, 0xffff
je 0x10003ac9
mov edi, dword [esi + 0x40]
movsx edx, ax
mov eax, dword [esi + 0x1c]
mov dx, word [eax + edx*2]
mov word [edi + ebx*2 + 2], dx
jmp 0x10003ad3
mov eax, dword [esi + 0x40]
mov word [eax + ebx*2 + 2], 0
mov edx, dword [esi + 0x44]
mov ebp, 1
cmp word [edx + ebx*2 + 2], bp
jl 0x10003b43
mov dword [esp + 0x18], ecx
mov eax, dword [esi + 0x30]
mov dx, word [ecx + eax]
cmp dx, 0xffff
je 0x10003b2b
mov ecx, ebx
shl ecx, 4
add ecx, ebp
mov ax, word [ecx*2 + 0x10023b90]
test ax, ax
je 0x10003b2b
mov ecx, dword [esi + 0x40]
movsx eax, ax
lea edi, [ecx + ebx*2 + 2]
mov ecx, dword [esi + 0x20]
movsx edx, dx
movsx eax, word [ecx + eax*2]
add eax, edx
cdq
idiv dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
mov cx, word [eax + edx*2]
xor word [edi], cx
mov edx, dword [esi + 0x44]
mov ecx, dword [esp + 0x18]
inc ebp
sub ecx, 2
movsx eax, word [edx + ebx*2 + 2]
cmp ebp, eax
mov dword [esp + 0x18], ecx
jle 0x10003ae6
mov ecx, dword [esi + 0x40]
movsx edx, word [ecx + ebx*2 + 2]
lea eax, [ecx + ebx*2 + 2]
mov ecx, dword [esi + 0x20]
mov dx, word [ecx + edx*2]
mov word [eax], dx
mov eax, dword [esi + 0x44]
movsx ecx, word [eax + ebx*2 + 2]
cmp ecx, dword [esi + 0xc]
jle 0x100038ce
mov edx, dword [esi + 0x44]
mov ecx, dword [esi + 0xc]
inc ebx
movsx eax, word [edx + ebx*2]
cmp eax, ecx
jg 0x10003cce
xor ecx, ecx
test eax, eax
jl 0x10003baa
mov eax, ebx
shl eax, 5
add eax, 0x10023b70
movsx edx, word [eax]
mov edi, dword [esi + 0x20]
inc ecx
add eax, 2
mov dx, word [edi + edx*2]
mov word [eax - 2], dx
mov edx, dword [esi + 0x44]
movsx edx, word [edx + ebx*2]
cmp ecx, edx
jle 0x10003b8d
mov ecx, dword [esi + 0x44]
mov edi, 1
mov eax, edi
cmp word [ecx + ebx*2], di
jl 0x10003bde
mov ecx, ebx
shl ecx, 5
add ecx, 0x10023b72
mov edx, dword [esi + 0x58]
mov bp, word [ecx]
add ecx, 2
mov word [edx + eax*2], bp
mov edx, dword [esi + 0x44]
inc eax
movsx edx, word [edx + ebx*2]
cmp eax, edx
jle 0x10003bc5
mov eax, dword [esi + 0x10]
xor edx, edx
cmp eax, edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], edi
jl 0x10003c6b
mov eax, dword [esi + 0x44]
mov ebp, 1
mov ecx, ebp
cmp word [eax + ebx*2], bp
jl 0x10003c5b
mov edi, dword [esi + 0x58]
mov ax, word [edi + ecx*2]
cmp ax, 0xffff
je 0x10003c2d
movsx eax, ax
add eax, ecx
cdq
idiv dword [esi + 0x10]
mov word [edi + ecx*2], dx
mov edi, dword [esi + 0x58]
mov eax, dword [esi + 0x1c]
movsx edx, word [edi + ecx*2]
movsx edx, word [eax + edx*2]
xor ebp, edx
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x44]
inc ecx
movsx eax, word [eax + ebx*2]
cmp ecx, eax
jle 0x10003c02
test ebp, ebp
jne 0x10003c5b
mov ecx, dword [esi + 0x4c]
mov eax, dword [esp + 0x10]
mov word [ecx + edx*2], ax
mov cx, word [esi + 0x10]
sub cx, ax
mov eax, dword [esi + 0x50]
mov word [eax + edx*2], cx
inc edx
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jle 0x10003bef
mov ecx, dword [esi + 0x44]
movsx ecx, word [ecx + ebx*2]
cmp edx, ecx
jne 0x10003cb2
xor eax, eax
test ecx, ecx
jle 0x10003c98
mov ecx, dword [esi + 0x50]
mov edi, dword [esi + 0x5c]
movsx ecx, word [ecx + eax*2]
xor byte [ecx + edi], 1
add ecx, edi
mov ecx, dword [esi + 0x44]
inc eax
movsx ecx, word [ecx + ebx*2]
cmp eax, ecx
jl 0x10003c7c
mov ecx, dword [esp + 0x20]
mov eax, 1
test ecx, ecx
je 0x10003ce0
pop edi
pop esi
pop ebp
mov word [ecx], dx
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esp + 0x20]
xor eax, eax
test ecx, ecx
je 0x10003ce0
mov dx, word [esp + 0x14]
pop edi
pop esi
pop ebp
mov word [ecx], dx
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esp + 0x20]
xor eax, eax
test ecx, ecx
je 0x10003ce0
mov dx, word [esp + 0x14]
mov word [ecx], dx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4