Function at 0x407bb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.004085c0
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408680
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x1c], ebx
je 0x407c6c
test esi, esi
mov ecx, esi
jle 0x408420
xor eax, eax
cmp ecx, 1
je 0x407c38
mov ecx, dword [esp + 0x15c8]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x407c20
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408420
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c8]
inc dword [esp + eax*4 + 0x30]
jmp 0x408420
lea ebp, [ebx + ebx*8]
mov eax, ebp
shl eax, 6
test esi, esi
mov ecx, edi
mov dword [esp + 0xc], edi
mov dword [esp + 0x24], eax
jle 0x407d2c
cmp esi, 1
jne 0x407f9b
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x407cc9
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0xc]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407cc9
mov word [esp + ebx*4 + 0x4b4], cx
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408680
add esp, 0xc
test ebx, ebx
sete byte [esp + 0x10]
je 0x407d43
xor eax, eax
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b4]
movzx edx, cl
mov esi, dword [esp + edx*4 + 0x934]
mov edi, esi
and edi, 1
xor esi, 1
lea esi, [esi + edi*2]
mov dword [esp + edx*4 + 0x934], esi
shr ecx, 8
inc dword [esp + ecx*4 + 0xd34]
inc eax
cmp ebx, eax
jne 0x407cf0
mov eax, dword [esp + 0xd34]
jmp 0x407d4c
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408680
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0x10], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x2c], eax
lea eax, [ebx - 1]
mov dword [esp + 0x20], eax
mov edx, ebx
and edx, 0xfffffffe
lea eax, [esp + 0x4b4]
mov dword [esp], eax
lea eax, [esp + 0x1134]
xor ecx, ecx
lea edi, [esp + 0x934]
mov dword [esp + 0x14], 0
mov dword [esp + 4], ebx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], edx
jmp 0x407dc4
mov esi, ebx
mov ebx, dword [esp + 0x14]
inc ebx
add ecx, 8
add edi, 0x400
mov eax, dword [esp + 8]
mov dword [esp + 0x14], ebx
cmp ebx, dword [esp + 0x2c]
mov ebx, esi
je 0x407ed1
mov esi, dword [esp]
mov dword [esp], eax
mov eax, 3
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0xa8], edx
add edx, dword [edi + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xac], edx
add edx, dword [edi + eax*4 - 8]
mov dword [esp + eax*4 + 0xb0], edx
add edx, dword [edi + eax*4 - 4]
mov dword [esp + eax*4 + 0xb4], edx
add edx, dword [edi + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x407de0
mov dword [esp + 8], esi
cmp byte [esp + 0x10], 0
jne 0x407da0
cmp dword [esp + 0x20], 0
je 0x407e8a
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 8]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], ebp
mov edx, dword [esi + eax*4]
mov ebp, dword [esp]
mov dword [ebp + ebx*4], edx
movzx edx, word [esi + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], ebp
mov edx, dword [esi + eax*4 + 4]
mov esi, dword [esp]
mov dword [esi + ebx*4], edx
mov edx, dword [esp + 0x18]
add eax, 2
cmp edx, eax
jne 0x407e30
jmp 0x407e8c
xor eax, eax
mov ebx, dword [esp + 4]
test bl, 1
mov ebp, dword [esp + 0x28]
je 0x407da0
mov esi, dword [esp + 8]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], ebp
mov ebp, dword [esp + 0x28]
mov eax, dword [esi + eax*4]
mov edx, dword [esp]
mov dword [edx + ebx*4], eax
mov ebx, dword [esp + 4]
jmp 0x407da0
test ebx, ebx
je 0x4082f7
mov edx, dword [esp + 4]
cmp edx, 1
jne 0x407eef
mov eax, dword [esp]
mov word [eax], 1
jmp 0x4081c2
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
cmp edx, 3
jl 0x408005
mov eax, 2
mov ecx, 2
sub ecx, edx
mov dword [esp + 8], ecx
xor edx, edx
mov esi, 1
mov ebx, dword [esp]
jmp 0x407f3e
movzx ecx, word [ebx + edx*4]
add word [ebx + esi*4], cx
mov word [ebx + edx*4], si
inc edx
mov ecx, dword [esp + 8]
add ecx, esi
inc ecx
inc esi
cmp ecx, 1
je 0x408014
movzx ecx, word [ebx + edx*4]
cmp eax, dword [esp + 4]
jge 0x407f51
movzx edi, word [ebx + eax*4]
cmp cx, di
jae 0x407f70
mov word [ebx + esi*4], cx
mov word [ebx + edx*4], si
inc edx
cmp eax, dword [esp + 4]
jge 0x407f20
jmp 0x407f7b
inc eax
mov word [ebx + esi*4], di
cmp eax, dword [esp + 4]
jge 0x407f20
cmp edx, esi
jge 0x407f90
movzx ecx, word [ebx + edx*4]
movzx edi, word [ebx + eax*4]
cmp cx, di
jb 0x407f24
jmp 0x407f94
movzx edi, word [ebx + eax*4]
inc eax
add word [ebx + esi*4], di
jmp 0x407f2d
mov ecx, esi
and ecx, 0xfffffffe
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x407fcb
add eax, 2
cmp ecx, eax
je 0x407c93
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407fe6
mov word [esp + ebx*4 + 0x4b4], si
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x407fc0
mov word [esp + ebx*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b6], si
inc ebx
jmp 0x407fc0
lea ebx, [edx - 2]
mov word [ecx + edx*4 - 8], 0
jmp 0x4080b1
mov edx, dword [esp]
mov eax, dword [esp + 4]
mov word [edx + eax*4 - 8], 0
lea ebx, [eax - 3]
lea ecx, [eax + 2]
mov eax, ebx
and ecx, 3
je 0x408051
mov eax, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edx + eax*4]
movzx esi, word [edx + esi*4]
inc esi
mov word [edx + eax*4], si
dec eax
dec ecx
jne 0x408040
mov ecx, dword [esp + 4]
mov edx, ebx
lea ebx, [ecx - 2]
cmp edx, 3
jb 0x4080b1
inc eax
mov edx, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edx + eax*4 - 4]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 4], cx
movzx ecx, word [edx + eax*4 - 8]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 8], cx
movzx ecx, word [edx + eax*4 - 0xc]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0xc], cx
movzx ecx, word [edx + eax*4 - 0x10]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x408070
mov edx, 1
xor edi, edi
mov eax, dword [esp + 0x20]
jmp 0x4080d4
mov edi, dword [esp + 8]
mov ecx, dword [esp + 0x18]
lea edx, [ecx + ecx]
inc edi
test ecx, ecx
jle 0x4081b7
mov dword [esp + 8], edi
test ebx, ebx
js 0x408110
lea edi, [ebx + 1]
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp]
movzx esi, word [esi + ebx*4]
cmp dword [esp + 8], esi
jne 0x408120
inc ecx
add ebx, 0xffffffff
jb 0x4080f0
mov ebx, 0xffffffff
jmp 0x408122
xor edi, edi
jmp 0x408122
mov edi, ecx
mov esi, edx
sub esi, edi
mov dword [esp + 0x18], edi
jle 0x4080c0
mov ecx, edi
not ecx
add ecx, edx
and esi, 3
je 0x408173
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebx
lea ecx, [edx + 2]
mov ebx, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, edx
mov edx, dword [esp]
mov word [edx + eax*4], bx
dec eax
mov edx, edi
not edx
lea edx, [edx + edi*2]
dec ecx
dec esi
jne 0x408150
add edi, edi
sub edi, ecx
mov edx, edi
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp ecx, 3
mov esi, dword [esp]
mov edi, dword [esp + 8]
jb 0x4080c4
lea ecx, [edx + edx]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi + eax*4], di
mov word [esi + eax*4 - 4], di
mov word [esi + eax*4 - 8], di
mov word [esi + eax*4 - 0xc], di
add eax, 0xfffffffc
add edx, 0xfffffffc
add ecx, 0xfffffff8
cmp edx, dword [esp + 0x18]
jg 0x408190
jmp 0x4080c4
cmp dword [esp + 4], 0
jle 0x4082f7
mov ebx, dword [esp + 4]
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x20], 3
mov edi, dword [esp]
jb 0x40820a
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x30]
add ecx, 4
cmp edx, ecx
jne 0x4081e0
test eax, eax
je 0x40822d
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 + 0x30]
inc edx
cmp eax, edx
jne 0x408220
cmp ebx, 2
jl 0x4082f7
mov edx, dword [esp + 0x15cc]
lea eax, [edx + 1]
cmp eax, 0x21
jge 0x4082ac
mov ecx, dword [esp + edx*4 + 0x30]
neg edx
mov esi, dword [esp + 0x15cc]
and edx, 3
je 0x40826c
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + esi*4 + 0x30], ecx
inc eax
dec edx
jne 0x408260
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x4082a8
add eax, 3
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + edx*4 + 0x30], ecx
add eax, 4
cmp eax, 0x24
jne 0x408280
test edx, edx
jle 0x4082e7
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x2c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x4082c0
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
cmp eax, edx
jne 0x40856e
jmp 0x4082f7
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x40856e
shl ebp, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408680
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408680
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov ebx, dword [esp + 4]
jle 0x408415
add dword [esp], 0xfffffffe
mov eax, 1
jmp 0x408362
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
je 0x408415
mov edi, dword [esp + eax*4 + 0x30]
test edi, edi
jle 0x408350
mov edx, edi
and edx, 3
je 0x4083c0
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov ecx, dword [esp]
lea edi, [ecx + ebx*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov ecx, ebp
mov ebp, dword [esp + 0xc]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
mov ebp, ecx
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x408390
mov ebx, dword [esp + 4]
sub ebx, esi
mov edi, dword [esp + 8]
mov edx, edi
sub edx, esi
jmp 0x4083c2
mov edx, edi
cmp edi, 4
mov edi, dword [esp]
jb 0x408350
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0xc]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x4083d0
jmp 0x408350
mov ecx, dword [esp + 0x15c8]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x938], 0
mov eax, dword [esp + 0x15cc]
cmp eax, 2
jl 0x40849d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408448
xor eax, eax
mov edx, 2
jmp 0x408484
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add edx, 2
cmp ebx, edx
jne 0x408460
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c8]
je 0x40849d
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
test ecx, ecx
jle 0x408563
xor eax, eax
mov edx, dword [esp + 0x1c]
lea edx, [edx + edx*8]
mov esi, edx
shl esi, 5
add esi, edi
mov dword [esp], esi
shl edx, 6
add edx, edi
mov dword [esp + 0xc], edx
jmp 0x4084e8
mov ecx, dword [esp + 0xc]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c8]
inc eax
cmp eax, ecx
je 0x408563
mov edx, dword [esp]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x4084e3
mov edx, dword [esp + ebx*4 + 0x934]
lea edi, [edx + 1]
mov dword [esp + ebx*4 + 0x934], edi
xor edi, edi
cmp bl, 1
je 0x40854b
mov ebp, ebx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, edx
not esi
or esi, 1
add esi, edx
mov ecx, edx
shr ecx, 1
shl edi, 2
add esi, esi
add esi, 2
or esi, edi
mov edi, ecx
not edi
or edi, 1
add edi, ecx
inc edi
or edi, esi
shr edx, 2
add ebp, 0xfffffffe
jne 0x408520
test bl, 1
je 0x4084d0
add edi, edi
mov ecx, edx
not ecx
or ecx, 1
add ecx, edx
inc ecx
or edi, ecx
jmp 0x4084d0
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [esp + 0x15cc]
mov ecx, dword [esp + ebx*4 + 0x30]
mov esi, ecx
not esi
lea ecx, [esi + ecx*2]
mov dword [esp + ebx*4 + 0x30], ecx
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x4085a8
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x408590
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
cmp eax, edx
jne 0x40856e
jmp 0x4082f7