Function at 0x4098f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.0040a290
mov edi, edx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.0040a540
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x18], edi
je 0x4099be
test esi, esi
mov ecx, esi
jle 0x40a0d6
xor eax, eax
cmp ecx, 1
je 0x409988
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
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 0x409970
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x40a0d6
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x40a0d6
lea eax, [edi + edi*8]
mov dword [esp + 0x28], eax
mov ebx, eax
shl ebx, 6
test esi, esi
mov dword [esp + 0x24], ebx
jle 0x409a8c
cmp esi, 1
jne 0x409f35
xor eax, eax
xor ebp, ebp
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x409a1f
mov ecx, dword [esp + 0xc]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x409a1f
mov word [esp + ebp*4 + 0xb0], cx
mov word [esp + ebp*4 + 0xb2], ax
mov eax, ebp
xor eax, 1
and ebp, 1
lea ebp, [eax + ebp*2]
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.0040a540
add esp, 0xc
test ebp, ebp
sete byte [esp + 4]
je 0x409aa3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0xb0]
movzx edx, cl
mov esi, dword [esp + edx*4 + 0x530]
mov ebx, esi
and ebx, 1
xor esi, 1
lea esi, [esi + ebx*2]
mov dword [esp + edx*4 + 0x530], esi
shr ecx, 8
inc dword [esp + ecx*4 + 0x930]
inc eax
cmp ebp, eax
jne 0x409a50
mov eax, dword [esp + 0x930]
jmp 0x409aac
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.0040a540
add esp, 0xc
xor ebp, ebp
mov byte [esp + 4], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebp
setne cl
inc ecx
mov dword [esp + 0x1c], ecx
lea eax, [esp + 0xb0]
mov dword [esp], eax
lea eax, [esp + 0x1130]
xor ecx, ecx
lea esi, [esp + 0x530]
xor edx, edx
mov dword [esp + 0x14], ebp
jmp 0x409afe
mov edx, dword [esp + 8]
inc edx
add ecx, 8
mov esi, dword [esp + 0x10]
add esi, 0x400
mov eax, ebx
cmp edx, dword [esp + 0x1c]
je 0x409b96
mov dword [esp + 8], edx
mov ebx, dword [esp]
mov dword [esp], eax
mov edx, 3
xor eax, eax
nop
mov dword [esp + edx*4 + 0xd24], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xd28], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xd2c], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xd30], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x409b10
mov dword [esp + 0x10], esi
cmp byte [esp + 4], 0
mov esi, dword [esp]
jne 0x409ae0
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebp, word [ebx + edx*4]
shr ebp, cl
mov eax, ebp
not eax
or eax, 0xff
add eax, ebp
mov ebp, dword [esp + eax*4 + 0xd34]
lea edi, [ebp + 1]
mov dword [esp + eax*4 + 0xd34], edi
mov eax, dword [ebx + edx*4]
mov dword [esi + ebp*4], eax
mov ebp, dword [esp + 0x14]
inc edx
cmp ebp, edx
jne 0x409b60
jmp 0x409ae0
test ebp, ebp
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp + 0x28]
je 0x409fb9
cmp ebp, 1
jne 0x409bbb
mov eax, dword [esp]
mov word [eax], 1
jmp 0x409e0c
mov esi, dword [esp]
movzx eax, word [esi + 4]
add word [esi], ax
lea eax, [ebp - 1]
mov dword [esp + 0x10], eax
cmp eax, 2
jl 0x409c7f
mov ecx, 2
mov eax, 2
sub eax, ebp
mov dword [esp + 0x1c], eax
xor ebx, ebx
mov edx, 1
jmp 0x409c10
movzx eax, word [esi + ecx*4]
mov word [esp + 4], ax
inc ecx
movzx eax, word [esp + 4]
add word [esi + edx*4], ax
mov eax, dword [esp + 0x1c]
add eax, edx
inc eax
inc edx
cmp eax, 1
je 0x409c7f
cmp ecx, ebp
mov dword [esp + 8], ecx
jge 0x409c30
movzx eax, word [esi + ebx*4]
movzx ecx, word [esi + ecx*4]
cmp ax, cx
jb 0x409c34
inc dword [esp + 8]
mov word [esi + edx*4], cx
jmp 0x409c3d
movzx eax, word [esi + ebx*4]
mov word [esi + edx*4], ax
mov word [esi + ebx*4], dx
inc ebx
mov ecx, dword [esp + 8]
cmp ecx, ebp
jge 0x409c70
cmp ebx, edx
jge 0x409bf0
movzx eax, word [esi + ebx*4]
mov word [esp + 0x22], ax
movzx eax, word [esi + ecx*4]
mov word [esp + 4], ax
movzx eax, word [esp + 0x22]
cmp ax, word [esp + 4]
jae 0x409bf9
jmp 0x409c74
movzx eax, word [esi + ebx*4]
add word [esi + edx*4], ax
mov word [esi + ebx*4], dx
inc ebx
jmp 0x409c03
mov word [esi + ebp*4 - 8], 0
mov ebx, ebp
add ebx, 0xfffffffd
js 0x409d01
mov edx, esi
mov esi, ebp
and esi, 3
xor esi, 2
mov ecx, ebx
je 0x409cb1
mov ecx, ebx
nop
nop
nop
movzx eax, word [edx + ecx*4]
movzx eax, word [edx + eax*4]
inc eax
mov word [edx + ecx*4], ax
dec ecx
dec esi
jne 0x409ca0
cmp ebx, 3
jb 0x409d01
inc ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [edx + ecx*4 - 4]
movzx eax, word [edx + eax*4]
inc eax
mov word [edx + ecx*4 - 4], ax
movzx eax, word [edx + ecx*4 - 8]
movzx eax, word [edx + eax*4]
inc eax
mov word [edx + ecx*4 - 8], ax
movzx eax, word [edx + ecx*4 - 0xc]
movzx eax, word [edx + eax*4]
inc eax
mov word [edx + ecx*4 - 0xc], ax
movzx eax, word [edx + ecx*4 - 0x10]
movzx eax, word [edx + eax*4]
inc eax
mov word [edx + ecx*4 - 0x10], ax
add ecx, 0xfffffffc
jne 0x409cc0
lea ecx, [ebp - 2]
mov eax, 1
xor edx, edx
jmp 0x409d2f
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x10], ebx
mov esi, dword [esp + 8]
lea eax, [esi + esi]
inc edx
test esi, esi
mov ebx, dword [esp + 0x15c8]
je 0x409e04
test ecx, ecx
mov dword [esp + 4], eax
js 0x409d60
lea ebx, [ecx + 1]
xor esi, esi
nop
nop
nop
nop
mov eax, dword [esp]
movzx eax, word [eax + ecx*4]
cmp edx, eax
jne 0x409d70
inc esi
dec ecx
cmp ebx, esi
jne 0x409d40
mov ecx, 0xffffffff
jmp 0x409d72
xor ebx, ebx
jmp 0x409d76
mov ebx, esi
mov eax, dword [esp + 4]
mov esi, eax
sub esi, ebx
mov dword [esp + 8], ebx
jle 0x409d10
and esi, 3
je 0x409dbb
mov eax, dword [esp]
mov ebx, dword [esp + 0x10]
lea eax, [eax + ebx*4]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc ebx
add eax, 0xfffffffc
cmp esi, ebx
jne 0x409da0
mov esi, dword [esp + 4]
sub esi, ebx
sub dword [esp + 0x10], ebx
mov ebx, dword [esp + 8]
jmp 0x409dbd
mov esi, eax
mov eax, ebx
sub eax, dword [esp + 4]
cmp eax, 0xfffffffc
mov eax, dword [esp]
mov ebx, dword [esp + 0x10]
ja 0x409d14
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax + ebx*4], dx
mov word [eax + ebx*4 - 4], dx
mov word [eax + ebx*4 - 8], dx
mov word [eax + ebx*4 - 0xc], dx
add ebx, 0xfffffffc
add esi, 0xfffffffc
cmp esi, dword [esp + 8]
jg 0x409de0
jmp 0x409d14
test ebp, ebp
jle 0x409fb9
lea edx, [ebp - 1]
mov eax, ebp
and eax, 3
xor ecx, ecx
cmp edx, 3
mov ebx, dword [esp]
jb 0x409e5a
mov edx, ebp
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x409e30
test eax, eax
je 0x409e7d
mov edx, dword [esp]
lea ecx, [edx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x2c]
inc edx
cmp eax, edx
jne 0x409e70
cmp ebp, 2
mov ebx, dword [esp + 0x15c8]
jl 0x409fb9
cmp ebx, 0x20
jge 0x409f00
mov eax, dword [esp + ebx*4 + 0x2c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x409ebc
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + ebx*4 + 0x2c], eax
dec edx
jne 0x409eb0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x409ef8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x3c]
add ecx, 4
mov dword [esp + ebx*4 + 0x2c], eax
cmp ecx, 0x20
jne 0x409ed0
test ebx, ebx
jle 0x409fa9
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x28]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x409f10
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x40a1f5
jmp 0x409fb9
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
lea edx, [ebx + eax]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
jmp 0x409f5b
add eax, 2
cmp ecx, eax
je 0x4099e3
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x409f80
mov word [esp + ebp*4 + 0xb0], si
mov word [esp + ebp*4 + 0xb2], ax
mov esi, ebp
xor esi, 1
and ebp, 1
lea ebp, [esi + ebp*2]
movzx esi, word [edx + eax*2]
test si, si
je 0x409f50
mov word [esp + ebp*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0xb2], si
mov esi, ebp
xor esi, 1
and ebp, 1
lea ebp, [esi + ebp*2]
jmp 0x409f50
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x40a1f5
shl edi, 5
mov esi, dword [esp + 0xc]
dec dword [esp + ebx*4 + 0x2c]
mov ecx, ebx
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x40a218
mov esi, dword [esp + ecx*4 + 0x28]
dec ecx
test esi, esi
je 0x40a200
dec esi
mov dword [esp + ecx*4 + 0x2c], esi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x40a1f5
jmp 0x409fb9