Function at 0x409100
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.00409b70
mov edi, edx
mov dword [esp + 0x10], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.00409d10
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x20], edi
je 0x4091ce
test esi, esi
mov ecx, esi
jle 0x4099b7
xor eax, eax
cmp ecx, 1
je 0x409198
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x20]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x10]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x2c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x2c]
add eax, 2
cmp ecx, eax
jne 0x409180
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x4099b7
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x4099b7
lea eax, [edi + edi*8]
mov dword [esp + 0x1c], eax
mov ebx, eax
shl ebx, 6
test esi, esi
jle 0x4092cb
cmp esi, 1
jne 0x40952e
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x409225
mov ecx, dword [esp + 0x10]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x409225
mov edx, edi
mov word [esp + edi*4 + 0xb0], cx
mov word [esp + edi*4 + 0xb2], ax
inc edx
mov edi, edx
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.00409d10
add esp, 0xc
test edi, edi
sete byte [esp + 7]
je 0x4092e2
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x40929f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x930]
shr edx, 8
inc dword [esp + edx*4 + 0xd30]
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x930]
shr edx, 8
inc dword [esp + edx*4 + 0xd30]
add eax, 2
cmp ecx, eax
jne 0x409260
mov edx, edi
test dl, 1
je 0x4092c2
movzx eax, word [esp + eax*4 + 0xb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x930]
shr eax, 8
inc dword [esp + eax*4 + 0xd30]
mov eax, dword [esp + 0xd30]
jmp 0x4092eb
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.00409d10
add esp, 0xc
xor edx, edx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x24], ebx
xor ecx, ecx
cmp eax, edx
setne cl
inc ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 8], edx
mov ebx, edx
and ebx, 0xfffffffe
lea ebp, [esp + 0xb0]
lea eax, [esp + 0x1130]
xor ecx, ecx
lea esi, [esp + 0x934]
xor edi, edi
mov dword [esp + 0xc], ebx
jmp 0x40934a
inc edi
add ecx, 8
add esi, 0x400
mov eax, ebp
cmp edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x14]
je 0x409454
mov dword [esp + 0x18], edi
mov dword [esp], ebp
mov dword [esp + 0x14], eax
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0x530], eax
mov ebp, dword [esi + edx*4 - 4]
mov ebx, ebp
xor ebx, eax
and ebp, eax
lea eax, [ebx + ebp*2]
mov dword [esp + edx*4 + 0x534], eax
mov ebx, dword [esi + edx*4]
mov ebp, ebx
xor ebp, eax
and ebx, eax
lea eax, [ebx*2]
add eax, ebp
add edx, 2
cmp edx, 0x100
jne 0x409360
cmp byte [esp + 7], 0
mov edi, dword [esp + 0x18]
mov ebp, dword [esp]
jne 0x409330
xor edx, edx
cmp dword [esp + 8], 1
mov edi, dword [esp + 0x14]
je 0x409417
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0x530]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0x530], ebp
mov eax, dword [esp]
mov eax, dword [eax + edx*4]
mov dword [edi + ebx*4], eax
mov eax, dword [esp]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0x530]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0x530], ebp
mov ebp, dword [esp]
mov eax, dword [ebp + edx*4 + 4]
mov dword [edi + ebx*4], eax
mov ebx, dword [esp + 0xc]
add edx, 2
cmp ebx, edx
jne 0x4093c0
test byte [esp + 8], 1
mov edi, dword [esp + 0x18]
je 0x409330
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0x530]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0x530], ebp
mov ebp, dword [esp]
mov eax, dword [ebp + edx*4]
mov edx, dword [esp + 0x14]
mov dword [edx + ebx*4], eax
jmp 0x409330
cmp dword [esp + 8], 0
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp + 0x1c]
je 0x409869
mov edx, dword [esp + 8]
cmp edx, 1
jne 0x40947e
mov word [ebp], 1
jmp 0x409742
movzx eax, word [ebp + 4]
add word [ebp], ax
lea esi, [edx - 1]
cmp esi, 2
jl 0x409595
mov dword [esp + 0xc], esi
mov ecx, 2
mov eax, 2
sub eax, edx
mov dword [esp], eax
xor esi, esi
mov edi, 1
jmp 0x4094cf
movzx eax, word [ebp + ecx*4]
inc ecx
add word [ebp + edi*4], ax
mov eax, dword [esp]
add eax, edi
inc eax
inc edi
cmp eax, 1
mov edx, dword [esp + 8]
je 0x4095a4
movzx eax, word [ebp + esi*4]
cmp ecx, edx
jge 0x4094e2
movzx edx, word [ebp + ecx*4]
cmp ax, dx
jae 0x409510
mov word [ebp + edi*4], ax
mov word [ebp + esi*4], di
inc esi
cmp ecx, dword [esp + 8]
jge 0x40951c
cmp esi, edi
jge 0x4094b0
movzx edx, word [ebp + esi*4]
movzx eax, word [ebp + ecx*4]
cmp dx, ax
jae 0x4094b5
jmp 0x409521
inc ecx
mov word [ebp + edi*4], dx
cmp ecx, dword [esp + 8]
jl 0x4094f3
movzx edx, word [ebp + esi*4]
add word [ebp + edi*4], dx
mov word [ebp + esi*4], di
inc esi
jmp 0x4094bb
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x10]
lea edx, [ebx + eax]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40955b
add eax, 2
cmp ecx, eax
je 0x4091ef
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x409576
mov word [esp + edi*4 + 0xb0], si
mov word [esp + edi*4 + 0xb2], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x409550
mov word [esp + edi*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xb2], si
inc edi
jmp 0x409550
lea ecx, [edx - 2]
mov word [ebp + edx*4 - 8], 0
jmp 0x409645
lea ecx, [edx - 2]
mov word [ebp + edx*4 - 8], 0
cmp edx, 3
jl 0x4095e9
lea esi, [edx - 3]
mov edi, edx
and edi, 3
xor edi, 2
mov edx, esi
je 0x4095e4
mov edx, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4], ax
dec edx
dec edi
jne 0x4095d0
cmp esi, 3
jae 0x4095ef
mov esi, dword [esp + 0xc]
jmp 0x409645
inc edx
mov esi, dword [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4 - 4]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 4], ax
movzx eax, word [ebp + edx*4 - 8]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 8], ax
movzx eax, word [ebp + edx*4 - 0xc]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 0xc], ax
movzx eax, word [ebp + edx*4 - 0x10]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 0x10], ax
add edx, 0xfffffffc
jne 0x409600
mov edi, 1
xor edx, edx
jmp 0x40965c
lea edi, [eax + eax]
inc edx
test eax, eax
je 0x409733
test ecx, ecx
mov dword [esp], edi
js 0x409690
lea eax, [ecx + 1]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, eax
movzx eax, word [ebp + ecx*4]
cmp edx, eax
jne 0x4096a0
inc edi
dec ecx
mov eax, ebx
cmp ebx, edi
jne 0x409670
mov ecx, 0xffffffff
jmp 0x4096a2
xor eax, eax
sub edi, eax
jg 0x4096b0
jmp 0x409650
mov eax, edi
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp]
sub edi, eax
jle 0x409650
and edi, 3
je 0x4096ee
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], esi
lea eax, [esi*4]
add eax, ebp
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc esi
add eax, 0xfffffffc
cmp edi, esi
jne 0x4096d0
mov edi, dword [esp]
sub edi, esi
mov eax, dword [esp + 0xc]
sub eax, esi
mov esi, eax
mov eax, dword [esp + 0x18]
jmp 0x4096f1
mov edi, dword [esp]
mov ebx, eax
sub eax, dword [esp]
cmp eax, 0xfffffffc
mov eax, ebx
mov ebx, dword [esp + 0x15c8]
ja 0x409650
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp + esi*4], dx
mov word [ebp + esi*4 - 4], dx
mov word [ebp + esi*4 - 8], dx
mov word [ebp + esi*4 - 0xc], dx
add esi, 0xfffffffc
add edi, 0xfffffffc
cmp edi, eax
jg 0x409710
jmp 0x409650
cmp dword [esp + 8], 0
mov edi, dword [esp + 0x1c]
jle 0x409869
xor eax, eax
mov edx, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebp + eax*4]
inc dword [esp + ecx*4 + 0x2c]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, edx
jl 0x409750
cmp edx, 2
jl 0x409869
lea ecx, [ebx + ebx]
and ecx, 2
mov edx, ebx
xor edx, 1
lea eax, [ecx + edx]
cmp eax, 0x20
jg 0x40979e
mov eax, dword [esp + ebx*4 + 0x2c]
add ecx, edx
dec ecx
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x2c], eax
inc ecx
cmp ecx, 0x20
jl 0x409790
test ebx, ebx
jle 0x4097b5
lea eax, [ebx - 1]
mov edi, ebx
and edi, 3
cmp eax, 3
jae 0x4097c5
xor edx, edx
mov esi, ebx
jmp 0x409823
mov eax, 1
mov ecx, ebx
shl eax, cl
xor edx, edx
jmp 0x409993
mov dword [esp + 0xc], edi
mov eax, ebx
and eax, 0x7ffffffc